aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2011-02-22 15:19:35 +0000
committerJoerg Sonnenberger <joerg@bec.de>2011-02-22 15:19:35 +0000
commit0bb208c91e91e2fe91e0f487b00ff4b5b30c8cc2 (patch)
tree9e4ff94803760726483042250dd295b2d9c86fd1
parenta5ef584fd3d18da0c98342b4b6453948b7eb30d3 (diff)
Remove the storage for -cxx-system-include. Make libcxx toolchain
use -nostdinc++ and -cxx-isystem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126223 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Frontend/HeaderSearchOptions.h3
-rw-r--r--lib/Driver/ToolChain.cpp3
-rw-r--r--lib/Frontend/CompilerInvocation.cpp5
-rw-r--r--lib/Frontend/InitHeaderSearch.cpp9
4 files changed, 4 insertions, 16 deletions
diff --git a/include/clang/Frontend/HeaderSearchOptions.h b/include/clang/Frontend/HeaderSearchOptions.h
index 51e22d23d7..b0669eba4c 100644
--- a/include/clang/Frontend/HeaderSearchOptions.h
+++ b/include/clang/Frontend/HeaderSearchOptions.h
@@ -55,9 +55,6 @@ public:
/// User specified include entries.
std::vector<Entry> UserEntries;
- /// If non-empty, the list of C++ standard include paths to use.
- std::vector<std::string> CXXSystemIncludes;
-
/// A (system-path) delimited list of include paths to be added from the
/// environment following the user specified includes (but prior to builtin
/// and standard includes). This is parsed in the same manner as the CPATH
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index e4051a165b..e305683930 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -198,7 +198,8 @@ void ToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &Args,
switch (Type) {
case ToolChain::CST_Libcxx:
- CmdArgs.push_back("-cxx-system-include");
+ CmdArgs.push_back("-nostdinc++");
+ CmdArgs.push_back("-cxx-isystem");
CmdArgs.push_back("/usr/include/c++/v1");
break;
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index d510b5bc52..17daca8a7b 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -473,11 +473,6 @@ static void HeaderSearchOptsToArgs(const HeaderSearchOptions &Opts,
Res.push_back(Opts.Sysroot);
}
- for (unsigned i = 0, e = Opts.CXXSystemIncludes.size(); i != e; ++i) {
- Res.push_back("-cxx-system-include");
- Res.push_back(Opts.CXXSystemIncludes[i]);
- }
-
/// User specified include entries.
for (unsigned i = 0, e = Opts.UserEntries.size(); i != e; ++i) {
const HeaderSearchOptions::Entry &E = Opts.UserEntries[i];
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 855a9bed4c..2e3162c0a3 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -816,13 +816,8 @@ AddDefaultCPlusPlusIncludePaths(const llvm::Triple &triple) {
void InitHeaderSearch::AddDefaultSystemIncludePaths(const LangOptions &Lang,
const llvm::Triple &triple,
const HeaderSearchOptions &HSOpts) {
- if (Lang.CPlusPlus && HSOpts.UseStandardCXXIncludes) {
- if (!HSOpts.CXXSystemIncludes.empty()) {
- for (unsigned i = 0, e = HSOpts.CXXSystemIncludes.size(); i != e; ++i)
- AddPath(HSOpts.CXXSystemIncludes[i], CXXSystem, true, false, false);
- } else
- AddDefaultCPlusPlusIncludePaths(triple);
- }
+ if (Lang.CPlusPlus && HSOpts.UseStandardCXXIncludes)
+ AddDefaultCPlusPlusIncludePaths(triple);
AddDefaultCIncludePaths(triple, HSOpts);