forked from OSchip/llvm-project
avoid ///usr/include/foo.h, patch by Sean Middleditch
llvm-svn: 44731
This commit is contained in:
parent
283d094b75
commit
9c4aad2dba
|
@ -622,10 +622,17 @@ static std::vector<DirectoryLookup> IncludeGroup[4];
|
|||
static void AddPath(const std::string &Path, IncludeDirGroup Group,
|
||||
bool isCXXAware, bool isUserSupplied,
|
||||
bool isFramework, FileManager &FM) {
|
||||
assert(!Path.empty() && "can't handle empty path here");
|
||||
|
||||
const DirectoryEntry *DE;
|
||||
if (Group == System)
|
||||
if (Group == System) {
|
||||
if (isysroot != "/")
|
||||
DE = FM.getDirectory(isysroot + "/" + Path);
|
||||
else if (Path[0] == '/')
|
||||
DE = FM.getDirectory(Path);
|
||||
else
|
||||
DE = FM.getDirectory("/" + Path);
|
||||
} else
|
||||
DE = FM.getDirectory(Path);
|
||||
|
||||
if (DE == 0) {
|
||||
|
|
Loading…
Reference in New Issue