[cfe-commits] r84325 - /cfe/trunk/tools/clang-cc/clang-cc.cpp

Daniel Dunbar daniel at zuster.org
Sat Oct 17 02:04:58 PDT 2009


Author: ddunbar
Date: Sat Oct 17 04:04:56 2009
New Revision: 84325

URL: http://llvm.org/viewvc/llvm-project?rev=84325&view=rev
Log:
Simplify (move guard to caller instead of callee).

Modified:
    cfe/trunk/tools/clang-cc/clang-cc.cpp

Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=84325&r1=84324&r2=84325&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Sat Oct 17 04:04:56 2009
@@ -1139,9 +1139,6 @@
 
 // Add the clang headers, which are relative to the clang binary.
 void AddClangIncludePaths(const char *Argv0, InitHeaderSearch *Init) {
-  if (nostdclanginc)
-    return;
-
   llvm::sys::Path MainExecutablePath =
      llvm::sys::Path::GetMainExecutable(Argv0,
                                     (void*)(intptr_t)AddClangIncludePaths);
@@ -1243,7 +1240,8 @@
 
   Init.AddDefaultEnvVarPaths(Lang);
 
-  AddClangIncludePaths(Argv0, &Init);
+  if (!nostdclanginc)
+    AddClangIncludePaths(Argv0, &Init);
 
   if (!nostdinc)
     Init.AddDefaultSystemIncludePaths(Lang, triple);





More information about the cfe-commits mailing list