================
@@ -328,20 +328,20 @@ void StmtProfiler::VisitGCCAsmStmt(const GCCAsmStmt *S) {
   VisitStmt(S);
   ID.AddBoolean(S->isVolatile());
   ID.AddBoolean(S->isSimple());
-  VisitStringLiteral(S->getAsmString());
+  VisitExpr(S->getAsmStringExpr());
----------------
erichkeane wrote:

Typically we would just put all `Stmt*` nodes in the children (which doesn't 
require trailing storage, just a contiguous storage).
 
Looking closer:  `AsmStmt` seems to keep a list of `Expr*` (via `Expr**`) which 
was intended for this, but it seems that `GCCAsmStmt` actually completely 
ignores and instead allocates the clobbers and constraints in their own places 
instead of putting them all into `Exprs` as it seems was intended.

I guess I'm OK leaving this like this now that I've looked at it, if you can 
create a bug to have someone spend time refactoring the `AsmStmt` derived 
classes to be more coherently designed, and to better use `children`.

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

Reply via email to