diff --git a/include/LLVMSPIRVOpts.h b/include/LLVMSPIRVOpts.h index f5e301fb8b..ee7f38e75f 100644 --- a/include/LLVMSPIRVOpts.h +++ b/include/LLVMSPIRVOpts.h @@ -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; } diff --git a/lib/SPIRV/LLVMSPIRVOpts.cpp b/lib/SPIRV/LLVMSPIRVOpts.cpp index 166c61d518..f1dfe31998 100644 --- a/lib/SPIRV/LLVMSPIRVOpts.cpp +++ b/lib/SPIRV/LLVMSPIRVOpts.cpp @@ -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())