aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/expand/rust-macro-expand.h
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2020-12-22 12:17:34 +0800
committerSimplyTheOther <simplytheother@gmail.com>2020-12-22 19:24:37 +0800
commit627121b6996146d7b14f2ad848f416682b1ce0fe (patch)
treea3681b6a59e597860e51cfb742b866c64533efd0 /gcc/rust/expand/rust-macro-expand.h
parent30dd20c0098948de74f6a18978e78e2950782975 (diff)
downloadgcc-627121b6996146d7b14f2ad848f416682b1ce0fe.zip
gcc-627121b6996146d7b14f2ad848f416682b1ce0fe.tar.gz
gcc-627121b6996146d7b14f2ad848f416682b1ce0fe.tar.bz2
Added code to expand cfg! macros
Moved function body to prevent compile issues Moved around some definitions in rust-ast.h in attempt to prevent compile error
Diffstat (limited to 'gcc/rust/expand/rust-macro-expand.h')
-rw-r--r--gcc/rust/expand/rust-macro-expand.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/rust/expand/rust-macro-expand.h b/gcc/rust/expand/rust-macro-expand.h
index 6752090..0218600 100644
--- a/gcc/rust/expand/rust-macro-expand.h
+++ b/gcc/rust/expand/rust-macro-expand.h
@@ -42,9 +42,12 @@ struct MacroExpander
void expand_invoc (std::unique_ptr<AST::MacroInvocation> &invoc);
void expand_cfg_attrs (std::vector<AST::Attribute> &attrs);
- bool fails_cfg (std::vector<AST::Attribute> &attr);
+ bool fails_cfg (const std::vector<AST::Attribute> &attr) const;
+ bool fails_cfg_with_expand (std::vector<AST::Attribute> &attrs) const;
// Expand the data of a cfg! macro.
+ void parse_macro_to_meta_item (AST::MacroInvocData &invoc);
+ // Get the literal representation of a cfg! macro.
AST::Literal expand_cfg_macro (AST::MacroInvocData &invoc);
private: