aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorTaewook Oh <twoh@fb.com>2016-06-13 17:03:18 +0000
committerTaewook Oh <twoh@fb.com>2016-06-13 17:03:18 +0000
commite8533670bf22cda6339664618b2b0bfd76f83661 (patch)
tree268b16d618cd14c2c87f34ad0bab4b9ab4f063ac /clang/lib/Basic/FileManager.cpp
parent34c72c4773989d65460542f6425fda8b5d509586 (diff)
downloadllvm-e8533670bf22cda6339664618b2b0bfd76f83661.zip
llvm-e8533670bf22cda6339664618b2b0bfd76f83661.tar.gz
llvm-e8533670bf22cda6339664618b2b0bfd76f83661.tar.bz2
Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.
Differential Revision: http://reviews.llvm.org/D19843 Corresponding LLVM change: http://reviews.llvm.org/D19842 Re-commit after addressing issues with of generating too many warnings for Windows and asan test failures. Patch by Eric Niebler llvm-svn: 272562
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r--clang/lib/Basic/FileManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp
index c4cc8dc..ce9b7e1 100644
--- a/clang/lib/Basic/FileManager.cpp
+++ b/clang/lib/Basic/FileManager.cpp
@@ -312,6 +312,9 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile,
UFE.InPCH = Data.InPCH;
UFE.File = std::move(F);
UFE.IsValid = true;
+ if (UFE.File)
+ if (auto RealPathName = UFE.File->getName())
+ UFE.RealPathName = *RealPathName;
return &UFE;
}