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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 630f2e0..91226cf 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -308,6 +308,15 @@ enum cpp_normalize_level {
normalized_none
};
+enum cpp_main_search
+{
+ CMS_none, /* A regular source file. */
+ CMS_header, /* Is a directly-specified header file (eg PCH or
+ header-unit). */
+ CMS_user, /* Search the user INCLUDE path. */
+ CMS_system, /* Search the system INCLUDE path. */
+};
+
/* This structure is nested inside struct cpp_reader, and
carries all the options visible to the command line. */
struct cpp_options
@@ -566,6 +575,8 @@ struct cpp_options
/* The maximum depth of the nested #include. */
unsigned int max_include_depth;
+
+ cpp_main_search main_search : 8;
};
/* Diagnostic levels. To get a diagnostic without associating a
@@ -997,6 +1008,10 @@ extern const char *cpp_find_header_unit (cpp_reader *, const char *file,
too. If there was an error opening the file, it returns NULL. */
extern const char *cpp_read_main_file (cpp_reader *, const char *,
bool injecting = false);
+extern location_t cpp_main_loc (const cpp_reader *);
+
+/* Adjust for the main file to be an include. */
+extern void cpp_retrofit_as_include (cpp_reader *);
/* Set up built-ins with special behavior. Use cpp_init_builtins()
instead unless your know what you are doing. */