summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorTaewook Oh <twoh@fb.com>2016-06-03 18:52:51 +0000
committerTaewook Oh <twoh@fb.com>2016-06-03 18:52:51 +0000
commitfc5d13d9b180eefabe7936eb485418b2f696f50c (patch)
treeed40e8bd779b83bd2a51e4ec96e73027fee7f275 /clang/lib/Basic/FileManager.cpp
parent5c527f9963cb31bef117a7421c4480b2a59a7ce2 (diff)
downloadbcm5719-llvm-fc5d13d9b180eefabe7936eb485418b2f696f50c.tar.gz
bcm5719-llvm-fc5d13d9b180eefabe7936eb485418b2f696f50c.zip
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 Patch by Eric Niebler llvm-svn: 271708
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 c4cc8dc5419..f9fa2338992 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->str();
return &UFE;
}
OpenPOWER on IntegriCloud