Skip to content

Commit

Permalink
[NFC] Move enableAllExtensions out of header (#2459)
Browse files Browse the repository at this point in the history
The list of extensions has grown considerably, which makes this
member function definition fairly large.  Move it out of the header.
  • Loading branch information
svenvh authored Mar 28, 2024
1 parent 0838497 commit 1a1b648
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 1 addition & 5 deletions include/LLVMSPIRVOpts.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,7 @@ class TranslatorOpts {
GenKernelArgNameMD = ArgNameMD;
}

void enableAllExtensions() {
#define EXT(X) ExtStatusMap[ExtensionID::X] = true;
#include "LLVMSPIRVExtensions.inc"
#undef EXT
}
void enableAllExtensions();

void enableGenArgNameMD() { GenKernelArgNameMD = true; }

Expand Down
6 changes: 6 additions & 0 deletions lib/SPIRV/LLVMSPIRVOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
using namespace llvm;
using namespace SPIRV;

void TranslatorOpts::enableAllExtensions() {
#define EXT(X) ExtStatusMap[ExtensionID::X] = true;
#include "LLVMSPIRVExtensions.inc"
#undef EXT
}

bool TranslatorOpts::isUnknownIntrinsicAllowed(IntrinsicInst *II) const
noexcept {
if (!SPIRVAllowUnknownIntrinsics.has_value())
Expand Down

0 comments on commit 1a1b648

Please sign in to comment.