================ @@ -2586,10 +2586,11 @@ static void UpdateAsmCallInst(llvm::CallBase &Result, bool HasSideEffect, // Slap the source location of the inline asm into a !srcloc metadata on the // call. - if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(&S)) - Result.setMetadata("srcloc", - getAsmSrcLocInfo(gccAsmStmt->getAsmString(), CGF)); - else { + if (const auto *gccAsmStmt = dyn_cast<GCCAsmStmt>(&S)) { + if (const StringLiteral *SL = + dyn_cast<StringLiteral>(gccAsmStmt->getAsmStringExpr())) + Result.setMetadata("srcloc", getAsmSrcLocInfo(SL, CGF)); ---------------- efriedma-quic wrote:
What do the diagnostics look like if you get a parse failure inside the inline asm? https://github.com/llvm/llvm-project/pull/131003 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits