[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 17 07:13:03 PDT 2025


================
@@ -3326,9 +3325,11 @@ class GCCAsmStmt : public AsmStmt {
 
   //===--- Asm String Analysis ---===//
 
-  const StringLiteral *getAsmString() const { return AsmStr; }
-  StringLiteral *getAsmString() { return AsmStr; }
-  void setAsmString(StringLiteral *E) { AsmStr = E; }
+  const Expr *getAsmStringExpr() const { return AsmStr; }
+  Expr *getAsmStringExpr() { return AsmStr; }
+  void setAsmString(Expr *E) { AsmStr = E; }
----------------
erichkeane wrote:

this should either be `setAsmStringExpr` or the above be `getAsmString`.  I don't really car which.  THOUGH we are double-using `getAsmString` on 3332, so I suggest the former.  I can't find a way to set the Constraint or Clobbers though.

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


More information about the cfe-commits mailing list