File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 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) {
5454 report_fatal_error (" Unable to convert LLVM type to SPIRVType" , true );
5555}
5656
57+ #ifndef NDEBUG
5758static bool
5859storageClassRequiresExplictLayout (SPIRV::StorageClass::StorageClass SC) {
5960 switch (SC) {
@@ -85,6 +86,7 @@ storageClassRequiresExplictLayout(SPIRV::StorageClass::StorageClass SC) {
8586 }
8687 llvm_unreachable (" Unknown SPIRV::StorageClass enum" );
8788}
89+ #endif
8890
8991SPIRVGlobalRegistry::SPIRVGlobalRegistry (unsigned PointerSize)
9092 : PointerSize(PointerSize), Bound(0 ) {}
@@ -1741,7 +1743,8 @@ SPIRVType *SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(
17411743
17421744SPIRVType *SPIRVGlobalRegistry::changePointerStorageClass (
17431745 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);
17451748 assert (storageClassRequiresExplictLayout (OldSC) ==
17461749 storageClassRequiresExplictLayout (SC));
17471750
You can’t perform that action at this time.
0 commit comments