summaryrefslogtreecommitdiff
path: root/gcc/incpath.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-10-11 18:09:59 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-10-11 18:09:59 +0000
commitb90c93381261e3c7fff0bf25fad4c22407ab9b73 (patch)
tree9ea0969a69bf3e506dfd77d4a35fb7ef8c761a34 /gcc/incpath.h
parent42851ff81dbe1ccaa16dbcc070513c181ff61eb7 (diff)
[PATCH] Include path enumeration
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00693.html gcc/ * incpath.h (enum incpath_kind): Name enum, prefix values. (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind. * incpath.c (heads, tails): Use INC_MAX. (add_env_var_paths, add_standard_paths): Use incpath_kind. (merge_include_chains, split_quote_chain, register_include_chains): Update incpath_kind names. (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind. * config/darwin-c.c (add_system_framework_path): Update incpath_kind names. (add_framework_path, darwin_register_objc_includes): Likewise. * config/vms/vms-c.c (vms_c_register_includes): Likewise. gcc/c-family/ * c-opts.c (add_prefixed_path): Change chain to incpath_kind. (c_common_handle_option): Update incpath_kind names. gcc/fortran/ * cpp.c (gfc_cpp_add_include_path): Update incpath_e names. (gfc_cpp_add_include_path_after): Likewise. From-SVN: r253654
Diffstat (limited to 'gcc/incpath.h')
-rw-r--r--gcc/incpath.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/incpath.h b/gcc/incpath.h
index 39a29cdd47e..32c3dceb78b 100644
--- a/gcc/incpath.h
+++ b/gcc/incpath.h
@@ -18,13 +18,22 @@
#ifndef GCC_INCPATH_H
#define GCC_INCPATH_H
+/* Various fragments of include path. */
+enum incpath_kind {
+ INC_QUOTE = 0, /* include "foo" */
+ INC_BRACKET, /* include <foo> */
+ INC_SYSTEM, /* sysinclude */
+ INC_AFTER, /* post-sysinclude. */
+ INC_MAX
+};
+
extern void split_quote_chain (void);
-extern void add_path (char *, int, int, bool);
+extern void add_path (char *, incpath_kind, int, bool);
extern void register_include_chains (cpp_reader *, const char *,
const char *, const char *,
int, int, int);
-extern void add_cpp_dir_path (struct cpp_dir *, int);
-extern struct cpp_dir *get_added_cpp_dirs (int);
+extern void add_cpp_dir_path (struct cpp_dir *, incpath_kind);
+extern struct cpp_dir *get_added_cpp_dirs (incpath_kind);
struct target_c_incpath_s {
/* Do extra includes processing. STDINC is false iff -nostdinc was given. */
@@ -34,6 +43,4 @@ struct target_c_incpath_s {
extern struct target_c_incpath_s target_c_incpath;
-enum { QUOTE = 0, BRACKET, SYSTEM, AFTER };
-
#endif /* GCC_INCPATH_H */