diff options
author | mxlol233 <mxlol233@outlook.com> | 2023-01-11 23:24:07 +0800 |
---|---|---|
committer | mxlol233 <mxlol233@outlook.com> | 2023-01-11 23:24:07 +0800 |
commit | 84009909526bec9f6a07b94b4df187f57b692b9c (patch) | |
tree | 34ffd4f5282a88e14fa7964f41a0d250793c9ad4 /gcc/rust/ast/rust-ast.h | |
parent | 59cbecb75d3fd270094c2008343bf86f0c3bf80d (diff) | |
download | gcc-84009909526bec9f6a07b94b4df187f57b692b9c.zip gcc-84009909526bec9f6a07b94b4df187f57b692b9c.tar.gz gcc-84009909526bec9f6a07b94b4df187f57b692b9c.tar.bz2 |
Add get_locus function for abstract class MetaItemInner.
This commit adds virtual function get_locus to base class MetaItemInner, which is helpful when we need to print diagnostics on some sub-classes of MetaItemInner.
Signed-off-by: Xiao Ma <mxlol233@outlook.com>
Diffstat (limited to 'gcc/rust/ast/rust-ast.h')
-rw-r--r-- | gcc/rust/ast/rust-ast.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 1539e78..6ec2841 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -630,6 +630,8 @@ public: virtual ~MetaItemInner (); + virtual Location get_locus () const = 0; + virtual std::string as_string () const = 0; virtual void accept_vis (ASTVisitor &vis) = 0; |