Skip to content

Surface inline-asm statement API on AsmStmt/GCCAsmStmt/MSAsmStmt#810

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-v22-asm-stmts
Jul 17, 2026
Merged

Surface inline-asm statement API on AsmStmt/GCCAsmStmt/MSAsmStmt#810
tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-v22-asm-stmts

Conversation

@tannergooding

Copy link
Copy Markdown
Member

Surfaces the inline-asm statement API now reachable through the v22 raw-interop regen. The AsmStmt/GCCAsmStmt/MSAsmStmt managed classes were empty validation shells; this wires them up over the mid-layer CXCursor asm accessors (also added here) so the high-level layer mirrors the clang C++ AST.

  • AsmStmt (base): IsSimple, IsVolatile, NumInputs/NumOutputs/NumClobbers, and the InputConstraints/OutputConstraints/Clobbers string lists.
  • GCCAsmStmt: AsmString, AsmStringExpr, IsAsmGoto, NumLabels, the InputExprs/OutputExprs/LabelExprs operand lists, and LabelNames.
  • MSAsmStmt: AsmString, HasBraces.

The count-guarded indexed bridges are exposed as IReadOnlyList<> to match the high-level layer's convention (no Get(i) indexers). List members are lazily materialized via LazyList.

Tests: added GCCAsmStmtTest and GCCAsmGotoTest to StmtTest covering extended asm (outputs/inputs/clobbers/volatile) and asm-goto labels. Build 0 warnings; interop suite green (81 pass).

Note

Authored with Copilot.

Wraps the v22 asm cursor bridges through the mid-layer CXCursor accessors and fills the previously-empty AsmStmt/GCCAsmStmt/MSAsmStmt shells with the shared constraint/clobber/operand surface, GCC-only asm-goto labels and template-string expr, and the MS brace flag.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tannergooding
tannergooding merged commit 762417f into dotnet:main Jul 17, 2026
12 checks passed
@tannergooding
tannergooding deleted the tannergooding-v22-asm-stmts branch July 17, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant