]> granicus.if.org Git - clang/commitdiff
Simplify (move guard to caller instead of callee).
authorDaniel Dunbar <daniel@zuster.org>
Sat, 17 Oct 2009 09:04:56 +0000 (09:04 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 17 Oct 2009 09:04:56 +0000 (09:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84325 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-cc/clang-cc.cpp

index 0ad7efbc4839d50806bc7299e1b554f09187d443..833386dd17bf19be4cbc3065611951a90f20a579 100644 (file)
@@ -1139,9 +1139,6 @@ isysroot("isysroot", llvm::cl::value_desc("dir"), llvm::cl::init("/"),
 
 // 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 @@ void InitializeIncludePaths(const char *Argv0, HeaderSearch &Headers,
 
   Init.AddDefaultEnvVarPaths(Lang);
 
-  AddClangIncludePaths(Argv0, &Init);
+  if (!nostdclanginc)
+    AddClangIncludePaths(Argv0, &Init);
 
   if (!nostdinc)
     Init.AddDefaultSystemIncludePaths(Lang, triple);