]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Rework InlineAsmOperand
authorOwen Avery <powerboat9.gamer@gmail.com>
Fri, 11 Oct 2024 01:24:50 +0000 (21:24 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 19 Mar 2025 14:32:16 +0000 (15:32 +0100)
commitb7f03bbd20d6aab28b85b8edb645ff20badd6d10
treeaa05eda632998791bddc4794b22766b39702ea12
parentb05e174a34799f5a24235ff5d553387963c41da4
gccrs: Rework InlineAsmOperand

Not thrilled with some of this boilerplate, but it does seem like an
improvement.

gcc/rust/ChangeLog:

* ast/rust-expr.h
(InlineAsmOperand): Replace multiple mutually-exclusive tl::optional
fields with a std::unique_ptr and modify nested classes to allow
this. Also, make getters return references where possible.
* expand/rust-macro-builtins-asm.cc
(parse_reg_operand_out): Pass location when constructing
InlineAsmOperand.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/ast/rust-expr.h
gcc/rust/expand/rust-macro-builtins-asm.cc