forked from OSchip/llvm-project
Bug fix, CPATH="" does not add '.' to search path.
llvm-svn: 57072
This commit is contained in:
parent
23bd6cc156
commit
3ca0a634c2
|
@ -81,7 +81,7 @@ void InitHeaderSearch::AddPath(const std::string &Path, IncludeDirGroup Group,
|
|||
|
||||
void InitHeaderSearch::AddEnvVarPaths(const char *Name) {
|
||||
const char* at = getenv(Name);
|
||||
if (!at)
|
||||
if (!at || *at == 0) // Empty string should not add '.' path.
|
||||
return;
|
||||
|
||||
const char* delim = strchr(at, llvm::sys::PathSeparator);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// RUN: env CPATH="xyz:xyz" clang -fsyntax-only -verify -DAS_SOURCE %s &&
|
||||
// RUN: env CPATH="xyz::xyz" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s &&
|
||||
// RUN: env CPATH="../Driver" clang -fsyntax-only -verify -DSHOULD_FIND -DAS_SOURCE %s
|
||||
// XFAIL
|
||||
|
||||
#ifdef AS_SOURCE
|
||||
#undef AS_SOURCE
|
||||
|
|
Loading…
Reference in New Issue