Skip to content

Commit 1a1b648

Browse files
authored
[NFC] Move enableAllExtensions out of header (#2459)
The list of extensions has grown considerably, which makes this member function definition fairly large. Move it out of the header.
1 parent 0838497 commit 1a1b648

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

include/LLVMSPIRVOpts.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,7 @@ class TranslatorOpts {
162162
GenKernelArgNameMD = ArgNameMD;
163163
}
164164

165-
void enableAllExtensions() {
166-
#define EXT(X) ExtStatusMap[ExtensionID::X] = true;
167-
#include "LLVMSPIRVExtensions.inc"
168-
#undef EXT
169-
}
165+
void enableAllExtensions();
170166

171167
void enableGenArgNameMD() { GenKernelArgNameMD = true; }
172168

lib/SPIRV/LLVMSPIRVOpts.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
using namespace llvm;
4848
using namespace SPIRV;
4949

50+
void TranslatorOpts::enableAllExtensions() {
51+
#define EXT(X) ExtStatusMap[ExtensionID::X] = true;
52+
#include "LLVMSPIRVExtensions.inc"
53+
#undef EXT
54+
}
55+
5056
bool TranslatorOpts::isUnknownIntrinsicAllowed(IntrinsicInst *II) const
5157
noexcept {
5258
if (!SPIRVAllowUnknownIntrinsics.has_value())

0 commit comments

Comments
 (0)