diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-04-20 02:23:52 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-04-20 02:23:52 +0000 |
commit | b10474903ca468fc2d66e07dac1e2121e5737833 (patch) | |
tree | 6402f363b6a17d58f1b07e0db7baa9645fc1798f /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | e08afaf8df5ff65a4d89d85dc923456bc5131151 (diff) | |
download | bcm5719-llvm-b10474903ca468fc2d66e07dac1e2121e5737833.tar.gz bcm5719-llvm-b10474903ca468fc2d66e07dac1e2121e5737833.zip |
Enable ODR uniquing of DITypes for ThinLTO backends
Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more places.
When invoking ThinLTO backend compiles via clang (for a distributed
build), invoke enableDebugTypeODRUniquing() before parsing the module.
Reviewers: dexonsmith, joker.eph
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D19264
llvm-svn: 266852
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 9bdbacd63f6..d280a3eaef1 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -794,6 +794,11 @@ void CodeGenAction::ExecuteAction() { if (Invalid) return; + // For ThinLTO backend invocations, ensure that the context + // merges types based on ODR identifiers. + if (!CI.getCodeGenOpts().ThinLTOIndexFile.empty()) + VMContext->enableDebugTypeODRUniquing(); + llvm::SMDiagnostic Err; TheModule = parseIR(MainFile->getMemBufferRef(), Err, *VMContext); if (!TheModule) { |