aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/cpplib.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/include/cpplib.h')
-rw-r--r--libcpp/include/cpplib.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 3ad52d5..99992a2 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -890,7 +890,21 @@ extern int cpp_avoid_paste (cpp_reader *, const cpp_token *,
extern const cpp_token *cpp_get_token (cpp_reader *);
extern const cpp_token *cpp_get_token_with_location (cpp_reader *,
source_location *);
-extern bool cpp_fun_like_macro_p (cpp_hashnode *);
+inline bool cpp_user_macro_p (const cpp_hashnode *node)
+{
+ return node->type == NT_MACRO && !(node->flags & NODE_BUILTIN);
+}
+inline bool cpp_builtin_macro_p (const cpp_hashnode *node)
+{
+ return node->flags & NODE_BUILTIN;
+}
+inline bool cpp_macro_p (const cpp_hashnode *node)
+{
+ return node->type == NT_MACRO;
+}
+/* Returns true if NODE is a function-like user macro. */
+extern bool cpp_fun_like_macro_p (cpp_hashnode *node);
+
extern const unsigned char *cpp_macro_definition (cpp_reader *,
cpp_hashnode *);
extern source_location cpp_macro_definition_location (cpp_hashnode *);