]> granicus.if.org Git - clang/commit
Reapply fixed "Honour 'use-external-names' in FileManager"
authorBen Langmuir <blangmuir@apple.com>
Fri, 28 Feb 2014 21:16:07 +0000 (21:16 +0000)
committerBen Langmuir <blangmuir@apple.com>
Fri, 28 Feb 2014 21:16:07 +0000 (21:16 +0000)
commitd066fe94b043330d26e29f3911aca79e52ebb0a9
treec7b22596537631ed47aedefc29d7450e9b2b0430
parentd353a18fca89468898520e8df3e25852531e70b3
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202539 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/clang/Basic/FileManager.h
include/clang/Basic/FileSystemStatCache.h
include/clang/Basic/VirtualFileSystem.h
lib/Basic/FileManager.cpp
lib/Basic/FileSystemStatCache.cpp
lib/Basic/VirtualFileSystem.cpp
lib/Frontend/CompilerInstance.cpp
lib/Lex/PTHLexer.cpp
test/VFS/Inputs/external-names.h [new file with mode: 0644]
test/VFS/Inputs/use-external-names.yaml [new file with mode: 0644]
test/VFS/external-names.c [new file with mode: 0644]
test/VFS/module-import.m
unittests/Basic/FileManagerTest.cpp