aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-07-11 12:43:49 -0700
committerIan Lance Taylor <iant@golang.org>2020-07-11 12:43:49 -0700
commit4854d721be78358e59367982bdd94461b4be3c5a (patch)
tree8ead189e618f8ef1456c8b02c81de0cc1585d8a6 /libcpp/include
parent3cdc95b9f8d6c90c4a279783fd3da961c5afb22c (diff)
parente109f6e438b72ef3e403162971068d28d09b82f5 (diff)
downloadgcc-4854d721be78358e59367982bdd94461b4be3c5a.zip
gcc-4854d721be78358e59367982bdd94461b4be3c5a.tar.gz
gcc-4854d721be78358e59367982bdd94461b4be3c5a.tar.bz2
Merge from trunk revision e109f6e438b72ef3e403162971068d28d09b82f5
Diffstat (limited to 'libcpp/include')
-rw-r--r--libcpp/include/cpplib.h25
-rw-r--r--libcpp/include/line-map.h11
2 files changed, 23 insertions, 13 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 03cc72a..e8bb15d 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -173,7 +173,7 @@ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11, CLK_GNUC17, CLK_GNUC2X,
CLK_STDC2X,
CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11,
CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17,
- CLK_GNUCXX2A, CLK_CXX2A, CLK_ASM};
+ CLK_GNUCXX20, CLK_CXX20, CLK_ASM};
/* Payload of a NUMBER, STRING, CHAR or COMMENT token. */
struct GTY(()) cpp_string {
@@ -484,7 +484,7 @@ struct cpp_options
/* Nonzero for C2X decimal floating-point constants. */
unsigned char dfp_constants;
- /* Nonzero for C++2a __VA_OPT__ feature. */
+ /* Nonzero for C++20 __VA_OPT__ feature. */
unsigned char va_opt;
/* Nonzero for the '::' token. */
@@ -969,17 +969,18 @@ extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int);
call cpp_finish on that reader. You can either edit the callbacks
through the pointer returned from cpp_get_callbacks, or set them
with cpp_set_callbacks. */
-extern cpp_options *cpp_get_options (cpp_reader *);
-extern cpp_callbacks *cpp_get_callbacks (cpp_reader *);
+extern cpp_options *cpp_get_options (cpp_reader *) ATTRIBUTE_PURE;
+extern cpp_callbacks *cpp_get_callbacks (cpp_reader *) ATTRIBUTE_PURE;
extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *);
-extern class mkdeps *cpp_get_deps (cpp_reader *);
+extern class mkdeps *cpp_get_deps (cpp_reader *) ATTRIBUTE_PURE;
/* This function reads the file, but does not start preprocessing. It
returns the name of the original file; this is the same as the
input file, except for preprocessed input. This will generate at
least one file change callback, and possibly a line change callback
too. If there was an error opening the file, it returns NULL. */
-extern const char *cpp_read_main_file (cpp_reader *, const char *);
+extern const char *cpp_read_main_file (cpp_reader *, const char *,
+ bool injecting = false);
/* Set up built-ins with special behavior. Use cpp_init_builtins()
instead unless your know what you are doing. */
@@ -1304,6 +1305,18 @@ extern int cpp_read_state (cpp_reader *, const char *, FILE *,
/* In lex.c */
extern void cpp_force_token_locations (cpp_reader *, location_t);
extern void cpp_stop_forcing_token_locations (cpp_reader *);
+enum CPP_DO_task
+{
+ CPP_DO_print,
+ CPP_DO_location,
+ CPP_DO_token
+};
+
+extern void cpp_directive_only_process (cpp_reader *pfile,
+ void *data,
+ void (*cb) (cpp_reader *,
+ CPP_DO_task,
+ void *data, ...));
/* In expr.c */
extern enum cpp_ttype cpp_userdef_string_remove_type
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index dbbc137..217f916 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -1024,13 +1024,11 @@ LINEMAPS_LAST_ALLOCATED_MACRO_MAP (const line_maps *set)
return (line_map_macro *)LINEMAPS_LAST_ALLOCATED_MAP (set, true);
}
-extern location_t get_combined_adhoc_loc (class line_maps *,
- location_t,
- source_range,
- void *);
+extern location_t get_combined_adhoc_loc (line_maps *, location_t,
+ source_range, void *);
extern void *get_data_from_adhoc_loc (const line_maps *, location_t);
extern location_t get_location_from_adhoc_loc (const line_maps *,
- location_t);
+ location_t);
extern source_range get_range_from_loc (line_maps *set, location_t loc);
@@ -1043,8 +1041,7 @@ pure_location_p (line_maps *set, location_t loc);
/* Given location LOC within SET, strip away any packed range information
or ad-hoc information. */
-extern location_t get_pure_location (line_maps *set,
- location_t loc);
+extern location_t get_pure_location (line_maps *set, location_t loc);
/* Combine LOC and BLOCK, giving a combined adhoc location. */