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

Marcos Maronas via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 07:41:46 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");
----------------
maarquitos14 wrote:

Thanks for catching that! 

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


More information about the llvm-commits mailing list