aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Driver/ToolChains.cpp10
-rw-r--r--lib/Frontend/CompilerInvocation.cpp11
2 files changed, 5 insertions, 16 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 9b84966d81..d787ee08e8 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1920,12 +1920,9 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include");
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
- // Ignore the sysroot, we *always* look for clang headers relative to
- // supplied path.
llvm::sys::Path P(D.ResourceDir);
P.appendComponent("include");
- CC1Args.push_back("-internal-nosysroot-isystem");
- CC1Args.push_back(DriverArgs.MakeArgString(P.str()));
+ addSystemInclude(DriverArgs, CC1Args, P.str());
}
if (DriverArgs.hasArg(options::OPT_nostdlibinc))
@@ -2381,12 +2378,9 @@ void Windows::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
return;
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
- // Ignore the sysroot, we *always* look for clang headers relative to
- // supplied path.
llvm::sys::Path P(getDriver().ResourceDir);
P.appendComponent("include");
- CC1Args.push_back("-internal-nosysroot-isystem");
- CC1Args.push_back(DriverArgs.MakeArgString(P.str()));
+ addSystemInclude(DriverArgs, CC1Args, P.str());
}
if (DriverArgs.hasArg(options::OPT_nostdlibinc))
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 1bcad24ee4..c247e21737 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/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));
}