summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-11-07 09:17:31 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-11-07 09:17:31 +0000
commita62ba816827383e621c5737e33a93b716e1db5b4 (patch)
treee2c9fd09af76f53cbb6fa72bbc2812b1823185f6 /clang/lib/Frontend/CompilerInvocation.cpp
parentf470173e46c5eff5025d887a92f4854f9f34b800 (diff)
downloadbcm5719-llvm-a62ba816827383e621c5737e33a93b716e1db5b4.tar.gz
bcm5719-llvm-a62ba816827383e621c5737e33a93b716e1db5b4.zip
Rip out one of the features I added for the driver-include-management.
We don't actually need a separate flag for non-sysrooted paths as the driver has to manage the sysroot anyways. The driver is not infrequently adding paths to the header search based on their existence on the filesystem. For that, it has to add the sysroot anyways, we should pass it on down to CC1 already joined. More importantly, the driver cannot in all cases distinguish between sysrooted paths and paths that are relative to the Clang binary's installation directory. Essentially, we always need to ignore the system root for these internal header search options. It turns out in most of the places we were already providing the system root in the driver, and then another one in CC1 so this fixes several bugs. llvm-svn: 143917
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 1bcad24ee4d..c247e217376 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -577,9 +577,7 @@ static void HeaderSearchOptsToArgs(const HeaderSearchOptions &Opts,
} else {
if (E.IsInternal) {
assert(E.Group == frontend::System && "Unexpected header search group");
- if (E.IgnoreSysRoot)
- Res.push_back("-internal-nosysroot-isystem");
- else if (E.ImplicitExternC)
+ if (E.ImplicitExternC)
Res.push_back("-internal-externc-isystem");
else
Res.push_back("-internal-isystem");
@@ -1496,14 +1494,11 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
// Add the internal paths from a driver that detects standard include paths.
for (arg_iterator I = Args.filtered_begin(OPT_internal_isystem,
- OPT_internal_externc_isystem,
- OPT_internal_nosysroot_isystem),
+ OPT_internal_externc_isystem),
E = Args.filtered_end();
I != E; ++I)
Opts.AddPath((*I)->getValue(Args), frontend::System,
- false, false,
- (*I)->getOption().matches(OPT_internal_nosysroot_isystem),
- /*IsInternal=*/true,
+ false, false, /*IgnoreSysRoot=*/true, /*IsInternal=*/true,
(*I)->getOption().matches(OPT_internal_externc_isystem));
}
OpenPOWER on IntegriCloud