summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2019-08-31 01:26:04 +0000
committerAlex Lorenz <arphaman@gmail.com>2019-08-31 01:26:04 +0000
commit0377ca641c9af0262270d091578cab19523b1bc6 (patch)
tree07dd78901eff6d926370fdd5414576a90fdfd40e /clang/lib/Lex/PPDirectives.cpp
parent09490012afde4ef89165f42d143e18a81e7a1054 (diff)
downloadbcm5719-llvm-0377ca641c9af0262270d091578cab19523b1bc6.tar.gz
bcm5719-llvm-0377ca641c9af0262270d091578cab19523b1bc6.zip
Introduce a DirectoryEntryRef that stores both a reference and an
accessed name to the directory entry This commit introduces a parallel API that returns a DirectoryEntryRef to the FileManager, similar to the parallel FileEntryRef API. All uses will have to be update in follow-up patches. The immediate use of the new API in this patch fixes the issue where a file manager was reused in clang-scan-deps, but reported an different file path whenever a framework lookup was done through a symlink. Differential Revision: https://reviews.llvm.org/D67026 llvm-svn: 370562
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 525f95b96e0..d9a98dc4eff 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -1695,7 +1695,7 @@ Optional<FileEntryRef> Preprocessor::LookupHeaderIncludeOrImport(
// Give the clients a chance to recover.
SmallString<128> RecoveryPath;
if (Callbacks->FileNotFound(Filename, RecoveryPath)) {
- if (auto DE = FileMgr.getDirectory(RecoveryPath)) {
+ if (auto DE = FileMgr.getOptionalDirectoryRef(RecoveryPath)) {
// Add the recovery path to the list of search paths.
DirectoryLookup DL(*DE, SrcMgr::C_User, false);
HeaderInfo.AddSearchPath(DL, isAngled);
OpenPOWER on IntegriCloud