summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-02-28 21:16:07 +0000
committerBen Langmuir <blangmuir@apple.com>2014-02-28 21:16:07 +0000
commitd066d4c849be06a01c0d17e8dc206913f4e7bfe3 (patch)
tree546f4a519c542578e5c03bfe24077319ffab8f2b /clang/lib/Frontend/CompilerInstance.cpp
parenta98d400fec0e41392d66eb1c1df631c534a8760c (diff)
downloadbcm5719-llvm-d066d4c849be06a01c0d17e8dc206913f4e7bfe3.tar.gz
bcm5719-llvm-d066d4c849be06a01c0d17e8dc206913f4e7bfe3.zip
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
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index cdc4b64af77..a2b321ff6c9 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -886,7 +886,7 @@ static void compileModule(CompilerInstance &ImportingInstance,
// Note that this module is part of the module build stack, so that we
// can detect cycles in the module graph.
- Instance.createFileManager(); // FIXME: Adopt file manager from importer?
+ Instance.setFileManager(&ImportingInstance.getFileManager());
Instance.createSourceManager(Instance.getFileManager());
SourceManager &SourceMgr = Instance.getSourceManager();
SourceMgr.setModuleBuildStack(
OpenPOWER on IntegriCloud