From d066d4c849be06a01c0d17e8dc206913f4e7bfe3 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Fri, 28 Feb 2014 21:16:07 +0000 Subject: Reapply fixed "Honour 'use-external-names' in FileManager" Was r202442 There were two issues with the original patch that have now been fixed. 1. We were memset'ing over a FileEntry in a test case. After adding a std::string to FileEntry, this still happened to not break for me. 2. I didn't pass the FileManager into the new compiler instance in compileModule. This was hidden in some cases by the fact I didn't clear the module cache in the test. Also, I changed the copy constructor for FileEntry, which was memcpy'ing in a (now) unsafe way. llvm-svn: 202539 --- clang/lib/Basic/FileSystemStatCache.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Basic/FileSystemStatCache.cpp') diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp index b225facbad9..e50dc1b5ed0 100644 --- a/clang/lib/Basic/FileSystemStatCache.cpp +++ b/clang/lib/Basic/FileSystemStatCache.cpp @@ -32,6 +32,7 @@ void FileSystemStatCache::anchor() { } static void copyStatusToFileData(const vfs::Status &Status, FileData &Data) { + Data.Name = Status.getName(); Data.Size = Status.getSize(); Data.ModTime = Status.getLastModificationTime().toEpochTime(); Data.UniqueID = Status.getUniqueID(); -- cgit v1.2.3