[llvm] [SPIRV] Fix code quality issues. (PR #152005)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 04:16:50 PDT 2025


================
@@ -591,7 +592,8 @@ void SPIRVAsmPrinter::outputAnnotations(const Module &M) {
           cast<GlobalVariable>(CS->getOperand(1)->stripPointerCasts());
 
       StringRef AnnotationString;
-      getConstantStringInfo(GV, AnnotationString);
+      bool Success = getConstantStringInfo(GV, AnnotationString);
+      assert(Success && "Failed to get annotation string");
----------------
Keenuts wrote:

You'll need to `(void)Success` otherwise warning when building with nassert

https://github.com/llvm/llvm-project/pull/152005


More information about the llvm-commits mailing list