Use DirectoryLookup::getName() rather than getDir()->getName() in a context where we don't know whether we have a normal directory

llvm-svn: 130467
This commit is contained in:
Douglas Gregor 2011-04-29 00:45:09 +00:00
parent 9ade5e2495
commit 68dac4676d
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ const FileEntry *DirectoryLookup::LookupFile(
Filename, HS.getFileMgr());
if (Result) {
if (SearchPath != NULL) {
llvm::StringRef SearchPathRef(getDir()->getName());
llvm::StringRef SearchPathRef(getName());
SearchPath->clear();
SearchPath->append(SearchPathRef.begin(), SearchPathRef.end());
}