forked from OSchip/llvm-project
Simplify (move guard to caller instead of callee).
llvm-svn: 84325
This commit is contained in:
parent
5119ce2d16
commit
f997f1e896
|
@ -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.
|
// Add the clang headers, which are relative to the clang binary.
|
||||||
void AddClangIncludePaths(const char *Argv0, InitHeaderSearch *Init) {
|
void AddClangIncludePaths(const char *Argv0, InitHeaderSearch *Init) {
|
||||||
if (nostdclanginc)
|
|
||||||
return;
|
|
||||||
|
|
||||||
llvm::sys::Path MainExecutablePath =
|
llvm::sys::Path MainExecutablePath =
|
||||||
llvm::sys::Path::GetMainExecutable(Argv0,
|
llvm::sys::Path::GetMainExecutable(Argv0,
|
||||||
(void*)(intptr_t)AddClangIncludePaths);
|
(void*)(intptr_t)AddClangIncludePaths);
|
||||||
|
@ -1243,7 +1240,8 @@ void InitializeIncludePaths(const char *Argv0, HeaderSearch &Headers,
|
||||||
|
|
||||||
Init.AddDefaultEnvVarPaths(Lang);
|
Init.AddDefaultEnvVarPaths(Lang);
|
||||||
|
|
||||||
AddClangIncludePaths(Argv0, &Init);
|
if (!nostdclanginc)
|
||||||
|
AddClangIncludePaths(Argv0, &Init);
|
||||||
|
|
||||||
if (!nostdinc)
|
if (!nostdinc)
|
||||||
Init.AddDefaultSystemIncludePaths(Lang, triple);
|
Init.AddDefaultSystemIncludePaths(Lang, triple);
|
||||||
|
|
Loading…
Reference in New Issue