[cfe-commits] r126223 - in /cfe/trunk: include/clang/Frontend/HeaderSearchOptions.h lib/Driver/ToolChain.cpp lib/Frontend/CompilerInvocation.cpp lib/Frontend/InitHeaderSearch.cpp

Joerg Sonnenberger joerg at bec.de
Tue Feb 22 07:19:35 PST 2011


Author: joerg
Date: Tue Feb 22 09:19:35 2011
New Revision: 126223

URL: http://llvm.org/viewvc/llvm-project?rev=126223&view=rev
Log:
Remove the storage for -cxx-system-include. Make libcxx toolchain
use -nostdinc++ and -cxx-isystem.

Modified:
    cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h
    cfe/trunk/lib/Driver/ToolChain.cpp
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp
    cfe/trunk/lib/Frontend/InitHeaderSearch.cpp

Modified: cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h?rev=126223&r1=126222&r2=126223&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h Tue Feb 22 09:19:35 2011
@@ -55,9 +55,6 @@
   /// 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

Modified: cfe/trunk/lib/Driver/ToolChain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=126223&r1=126222&r2=126223&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChain.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChain.cpp Tue Feb 22 09:19:35 2011
@@ -198,7 +198,8 @@
 
   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;
 

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=126223&r1=126222&r2=126223&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Feb 22 09:19:35 2011
@@ -473,11 +473,6 @@
     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];

Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=126223&r1=126222&r2=126223&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Tue Feb 22 09:19:35 2011
@@ -816,13 +816,8 @@
 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);
 





More information about the cfe-commits mailing list