GCC Middle and Back End API Reference
|
Enumerations | |
enum | { REASON_QUIET = 0, REASON_NOENT, REASON_DUP, REASON_DUP_SYS } |
Functions | |
static void | add_env_var_paths (const char *, int) |
static void | add_standard_paths (const char *, const char *, const char *, int) |
static void | free_path (struct cpp_dir *, int) |
static void | merge_include_chains (const char *, cpp_reader *, int) |
static void | add_sysroot_to_chain (const char *, int) |
static struct cpp_dir * | remove_duplicates (cpp_reader *, struct cpp_dir *, struct cpp_dir *, struct cpp_dir *, int) |
static void | free_path () |
static void | add_env_var_paths () |
static void | add_sysroot_to_chain () |
static void | merge_include_chains () |
void | split_quote_chain () |
void | add_cpp_dir_path () |
void | add_path () |
void | register_include_chains (cpp_reader *pfile, const char *sysroot, const char *iprefix, const char *imultilib, int stdinc, int cxx_stdinc, int verbose) |
struct cpp_dir * | get_added_cpp_dirs () |
static void | hook_void_charptr_charptr_int (const char *sysroot, const char *iprefix, int stdinc) |
Variables | |
static const char | dir_separator_str [] = { DIR_SEPARATOR, 0 } |
static struct cpp_dir * | heads [4] |
static struct cpp_dir * | tails [4] |
static bool | quote_ignores_source_dir |
struct target_c_incpath_s | target_c_incpath = { TARGET_EXTRA_PRE_INCLUDES, TARGET_EXTRA_INCLUDES } |
void add_cpp_dir_path | ( | ) |
|
static |
Referenced by register_include_chains().
|
static |
Read ENV_VAR for a PATH_SEPARATOR-separated list of file names; and append all the names to the search path CHAIN.
References add_path(), getenv(), memcpy(), path, and SYSTEM.
void add_path | ( | ) |
Add PATH to the include chain CHAIN. PATH must be malloc-ed and NUL-terminated.
References add_cpp_dir_path(), AFTER, path, strlen(), and SYSTEM.
Referenced by add_env_var_paths(), and add_standard_paths().
|
static |
Append the standard include chain defined in cppdefault.c.
References add_path(), default_include::add_sysroot, default_include::component, default_include::cplusplus, cpp_EXEC_PREFIX, cpp_GCC_INCLUDE_DIR, cpp_GCC_INCLUDE_DIR_len, cpp_include_defaults, cpp_PREFIX, cpp_PREFIX_len, cpp_relocated(), default_include::cxx_aware, dir_separator_str, default_include::fname, free(), gcc_exec_prefix, len, default_include::multilib, strlen(), SYSTEM, and update_path().
Referenced by register_include_chains().
|
static |
Referenced by merge_include_chains().
|
static |
Add SYSROOT to any user-supplied paths in CHAIN starting with "=".
References heads.
|
static |
Referenced by remove_duplicates(), and split_quote_chain().
|
static |
Free an element of the include chain, possibly giving a reason.
References free(), REASON_DUP, REASON_DUP_SYS, REASON_NOENT, and REASON_QUIET.
|
read |
Return the current chain of cpp dirs.
References heads.
|
static |
|
static |
Referenced by register_include_chains().
|
static |
Merge the four include chains together in the order quote, bracket, system, after. Remove duplicate dirs (determined in system-specific manner). We can't just merge the lists and then uniquify them because then we may lose directories from the <> search path that should be there; consider -iquote foo -iquote bar -Ifoo -Iquux. It is however safe to treat -iquote bar -iquote foo -Ifoo -Iquux as if written -iquote bar -Ifoo -Iquux.
References add_sysroot_to_chain(), AFTER, BRACKET, heads, QUOTE, remove_duplicates(), SYSTEM, and tails.
void register_include_chains | ( | cpp_reader * | pfile, |
const char * | sysroot, | ||
const char * | iprefix, | ||
const char * | imultilib, | ||
int | stdinc, | ||
int | cxx_stdinc, | ||
int | verbose | ||
) |
Exported function to handle include chain merging, duplicate removal, and registration with cpplib.
References add_env_var_paths(), add_standard_paths(), BRACKET, cpp_options, target_c_incpath_s::extra_includes, target_c_incpath_s::extra_pre_includes, heads, merge_include_chains(), QUOTE, quote_ignores_source_dir, SYSTEM, and target_c_incpath.
|
staticread |
For each duplicate path in chain HEAD, keep just the first one. Remove each path in chain HEAD that also exists in chain SYSTEM. Set the NEXT pointer of the last path in the resulting chain to JOIN, unless it duplicates JOIN in which case the last path is removed. Return the head of the resulting chain. Any of HEAD, JOIN and SYSTEM can be NULL.
References cpp_options, errno, free_path(), REASON_DUP, REASON_DUP_SYS, REASON_NOENT, and REASON_QUIET.
Referenced by merge_include_chains().
void split_quote_chain | ( | void | ) |
Use given -I paths for #include "..." but not #include <...>, and don't search the directory of the present file for #include "...". (Note that -I. -I- is not the same as the default setup; -I. uses the compiler's working dir.)
References BRACKET, free_path(), heads, QUOTE, quote_ignores_source_dir, REASON_QUIET, and tails.
|
static |
Referenced by add_standard_paths().
|
static |
Include chains heads and tails.
Referenced by add_cpp_dir_path(), add_sysroot_to_chain(), get_added_cpp_dirs(), merge_include_chains(), register_include_chains(), and split_quote_chain().
|
static |
Referenced by register_include_chains(), and split_quote_chain().
|
static |
Referenced by add_cpp_dir_path(), merge_include_chains(), and split_quote_chain().
struct target_c_incpath_s target_c_incpath = { TARGET_EXTRA_PRE_INCLUDES, TARGET_EXTRA_INCLUDES } |
Referenced by register_include_chains().