diff options
author | Jan Korous <jkorous@apple.com> | 2019-02-18 22:33:40 +0000 |
---|---|---|
committer | Jan Korous <jkorous@apple.com> | 2019-02-18 22:33:40 +0000 |
commit | cd8607db2d25f96c36b5eac6406f39ac15ac8894 (patch) | |
tree | 72dc3814e8529550974ad623aa7c7134bbefd0b3 /clang/lib/Basic/FileManager.cpp | |
parent | 9f14d169ccd98381dd1c582903e2655aba102157 (diff) | |
download | bcm5719-llvm-cd8607db2d25f96c36b5eac6406f39ac15ac8894.tar.gz bcm5719-llvm-cd8607db2d25f96c36b5eac6406f39ac15ac8894.zip |
Reland "[clang][FileManager] fillRealPathName even if we aren't opening the file"
This reverts commit e2bb3121fd4ab5b01f9ec1d2e3e9877db9c6a54c.
+ fixed test for Windows
llvm-svn: 354291
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index 75caff95559..41026763377 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -267,6 +267,9 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, if (UFE.File) { if (auto PathName = UFE.File->getName()) fillRealPathName(&UFE, *PathName); + } else if (!openFile) { + // We should still fill the path even if we aren't opening the file. + fillRealPathName(&UFE, InterndFileName); } return &UFE; } |