summaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r--lib/Driver/ToolChains.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index b140f9918e..ea604ccd07 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -1927,12 +1927,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))
@@ -2390,12 +2387,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))