File tree 1 file changed +4
-1
lines changed 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ static unsigned typeToAddressSpace(const Type *Ty) {
54
54
report_fatal_error (" Unable to convert LLVM type to SPIRVType" , true );
55
55
}
56
56
57
+ #ifndef NDEBUG
57
58
static bool
58
59
storageClassRequiresExplictLayout (SPIRV::StorageClass::StorageClass SC) {
59
60
switch (SC) {
@@ -85,6 +86,7 @@ storageClassRequiresExplictLayout(SPIRV::StorageClass::StorageClass SC) {
85
86
}
86
87
llvm_unreachable (" Unknown SPIRV::StorageClass enum" );
87
88
}
89
+ #endif
88
90
89
91
SPIRVGlobalRegistry::SPIRVGlobalRegistry (unsigned PointerSize)
90
92
: PointerSize(PointerSize), Bound(0 ) {}
@@ -1741,7 +1743,8 @@ SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(
1741
1743
1742
1744
SPIRVType *SPIRVGlobalRegistry::changePointerStorageClass (
1743
1745
SPIRVType *PtrType, SPIRV::StorageClass::StorageClass SC, MachineInstr &I) {
1744
- SPIRV::StorageClass::StorageClass OldSC = getPointerStorageClass (PtrType);
1746
+ [[maybe_unused]] SPIRV::StorageClass::StorageClass OldSC =
1747
+ getPointerStorageClass (PtrType);
1745
1748
assert (storageClassRequiresExplictLayout (OldSC) ==
1746
1749
storageClassRequiresExplictLayout (SC));
1747
1750
You can’t perform that action at this time.
0 commit comments