From b90c93381261e3c7fff0bf25fad4c22407ab9b73 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 11 Oct 2017 18:09:59 +0000 Subject: [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 --- gcc/incpath.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'gcc/incpath.h') diff --git a/gcc/incpath.h b/gcc/incpath.h index 39a29cd..32c3dce 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 */ + 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 */ -- cgit v1.1