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 | bd94a6e73a36a4c70b09eb4d6a689e03c2d9a010 (patch) | |
| tree | f357fd64281d4edf8e45983474cfa594ddbe3e0f /lib/Lex/HeaderSearch.cpp | |
| parent | ad57483a9ff0c36ca642528b81fbb05641e5d7f1 (diff) | |
| download | clang-bd94a6e73a36a4c70b09eb4d6a689e03c2d9a010.tar.gz | |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/HeaderSearch.cpp')
| -rw-r--r-- | lib/Lex/HeaderSearch.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index 0160677b2e..ddbb4d4b42 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/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('/'); |
