[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 14 00:42:22 PDT 2025
================
@@ -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());
----------------
cor3ntin wrote:
We would need a specific iterator type as we are not iterating over a single sequence of elements.
There is a pre-existing defect that we don't use trailing objects for the children, which is something we might want to do too, but it seems unrelated to this change.
Also, profiling can certainly done in an arbitrary order but ideally if we were to fix that we would interleave constraints and their corresponding expressions so that ASTDump
makes more sense
- template string
- input constraint, input constraint expression, etc...
- output constraint, output constraint expression, etc...
- clobbers
- label
Either way, I would rather keep the change separate
https://github.com/llvm/llvm-project/pull/131003
More information about the cfe-commits
mailing list