summaryrefslogtreecommitdiff
path: root/libcpp/macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/macro.c')
-rw-r--r--libcpp/macro.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 1e0a0b560ba..eb32a6f8c98 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -3307,6 +3307,15 @@ check_trad_stringification (cpp_reader *pfile, const cpp_macro *macro,
}
}
+/* Returns true of NODE is a function-like macro. */
+bool
+cpp_fun_like_macro_p (cpp_hashnode *node)
+{
+ return (node->type == NT_MACRO
+ && (node->flags & (NODE_BUILTIN | NODE_MACRO_ARG)) == 0
+ && node->value.macro->fun_like);
+}
+
/* Returns the name, arguments and expansion of a macro, in a format
suitable to be read back in again, and therefore also for DWARF 2
debugging info. e.g. "PASTE(X, Y) X ## Y", or "MACNAME EXPANSION".