SPIRV: Fix compilation in NDEBUG.
authorJames Y Knight <jyknight@google.com>
Thu, 11 Aug 2022 22:41:22 +0000 (22:41 +0000)
committerJames Y Knight <jyknight@google.com>
Fri, 12 Aug 2022 14:00:39 +0000 (14:00 +0000)
llvm/lib/Target/SPIRV/SPIRVDuplicatesTracker.cpp

index 1926977..2e426bb 100644 (file)
@@ -70,6 +70,7 @@ void SPIRVGeneralDuplicatesTracker::buildDepsGraph(
     }
   }
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   if (MMI) {
     const Module *M = MMI->getModule();
     for (auto F = M->begin(), E = M->end(); F != E; ++F) {
@@ -92,4 +93,5 @@ void SPIRVGeneralDuplicatesTracker::buildDepsGraph(
       }
     }
   }
+#endif
 }