aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/include')
-rw-r--r--libcpp/include/cpplib.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index a0d0c53..e0be2dc 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -605,8 +605,8 @@ struct cpp_callbacks
/* Callback to identify whether an attribute exists. */
int (*has_attribute) (cpp_reader *);
- /* Callback that can change a user builtin into normal macro. */
- bool (*user_builtin_macro) (cpp_reader *, cpp_hashnode *);
+ /* Callback that can change a user lazy into normal macro. */
+ void (*user_lazy_macro) (cpp_reader *, cpp_macro *, unsigned);
/* Callback to parse SOURCE_DATE_EPOCH from environment. */
time_t (*get_source_date_epoch) (cpp_reader *);
@@ -698,6 +698,9 @@ struct GTY(()) cpp_macro {
/* Number of parameters. */
unsigned short paramc;
+ /* Non-zero if this is a user-lazy macro, value provided by user. */
+ unsigned char lazy;
+
/* The kind of this macro (ISO, trad or assert) */
unsigned kind : 2;
@@ -778,9 +781,7 @@ enum cpp_builtin_type
BT_PRAGMA, /* `_Pragma' operator */
BT_TIMESTAMP, /* `__TIMESTAMP__' */
BT_COUNTER, /* `__COUNTER__' */
- BT_HAS_ATTRIBUTE, /* `__has_attribute__(x)' */
- BT_FIRST_USER, /* User defined builtin macros. */
- BT_LAST_USER = BT_FIRST_USER + 63
+ BT_HAS_ATTRIBUTE /* `__has_attribute__(x)' */
};
#define CPP_HASHNODE(HNODE) ((cpp_hashnode *) (HNODE))
@@ -1001,6 +1002,9 @@ extern void cpp_assert (cpp_reader *, const char *);
extern void cpp_undef (cpp_reader *, const char *);
extern void cpp_unassert (cpp_reader *, const char *);
+/* Mark a node as a lazily defined macro. */
+extern void cpp_define_lazily (cpp_reader *, cpp_hashnode *node, unsigned N);
+
/* Undefine all macros and assertions. */
extern void cpp_undef_all (cpp_reader *);