diff options
author | Alex Lorenz <arphaman@gmail.com> | 2019-08-31 01:26:04 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2019-08-31 01:26:04 +0000 |
commit | 0377ca641c9af0262270d091578cab19523b1bc6 (patch) | |
tree | 07dd78901eff6d926370fdd5414576a90fdfd40e /clang/lib/Lex/HeaderSearch.cpp | |
parent | 09490012afde4ef89165f42d143e18a81e7a1054 (diff) | |
download | bcm5719-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/HeaderSearch.cpp')
-rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 0160677b2ec..ddbb4d4b429 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -296,6 +296,7 @@ Module *HeaderSearch::lookupModule(StringRef ModuleName, StringRef SearchName, /// getName - Return the directory or filename corresponding to this lookup /// object. StringRef DirectoryLookup::getName() const { + // FIXME: Use the name from \c DirectoryEntryRef. if (isNormalDir()) return getDir()->getName(); if (isFramework()) @@ -496,7 +497,7 @@ Optional<FileEntryRef> DirectoryLookup::DoFrameworkLookup( // FrameworkName = "/System/Library/Frameworks/" SmallString<1024> FrameworkName; - FrameworkName += getFrameworkDir()->getName(); + FrameworkName += getFrameworkDirRef()->getName(); if (FrameworkName.empty() || FrameworkName.back() != '/') FrameworkName.push_back('/'); |