Simplify (move guard to caller instead of callee).

llvm-svn: 84325
This commit is contained in:
Daniel Dunbar 2009-10-17 09:04:56 +00:00
parent 5119ce2d16
commit f997f1e896
1 changed files with 2 additions and 4 deletions

View 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);