]> granicus.if.org Git - clang/commitdiff
Remove the storage for -cxx-system-include. Make libcxx toolchain
authorJoerg Sonnenberger <joerg@bec.de>
Tue, 22 Feb 2011 15:19:35 +0000 (15:19 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Tue, 22 Feb 2011 15:19:35 +0000 (15:19 +0000)
use -nostdinc++ and -cxx-isystem.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126223 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/HeaderSearchOptions.h
lib/Driver/ToolChain.cpp
lib/Frontend/CompilerInvocation.cpp
lib/Frontend/InitHeaderSearch.cpp

index 51e22d23d7a909fe7cc98227b6a895b0b217644b..b0669eba4ccc07e7c0e060fc09fef196045920c7 100644 (file)
@@ -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
index e4051a165b2da5fb944451d00d83ff8ee3e9f5a5..e305683930cf9f4fd11a3dd57f90deb4b9055f6f 100644 (file)
@@ -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;
 
index d510b5bc5241ef29a7468d2313eb64063f019038..17daca8a7b5cfb407999d8c264e3a9cc42eac316 100644 (file)
@@ -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];
index 855a9bed4c360b77f6a3f180f268fb278d9b4b60..2e3162c0a32e18a6560f891d4eebc87974222fff 100644 (file)
@@ -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);