Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions clang/lib/Frontend/CompilerInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1418,10 +1418,15 @@ std::unique_ptr<CompilerInstance> CompilerInstance::cloneForModuleCompileImpl(
auto WrapGenModuleAction = getGenModuleActionWrapper();
Instance.setGenModuleActionWrapper(WrapGenModuleAction);

// Share an output manager.
assert(hasOutputBackend() &&
"Expected an output manager to already be set up");
Instance.setOutputBackend(&getOutputBackend());
if (ThreadSafeConfig) {
// Create a clone of the existing output (pointing to the same destination).
Instance.setOutputBackend(getOutputBackend().clone());
} else {
// Share the existing output manager.
Instance.setOutputBackend(&getOutputBackend());
}

if (ThreadSafeConfig) {
Instance.setModuleDepCollector(ThreadSafeConfig->getModuleDepCollector());
Expand Down