r266852 - Enable ODR uniquing of DITypes for ThinLTO backends
Teresa Johnson via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 19 19:23:52 PDT 2016
Author: tejohnson
Date: Tue Apr 19 21:23:52 2016
New Revision: 266852
URL: http://llvm.org/viewvc/llvm-project?rev=266852&view=rev
Log:
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
Modified:
cfe/trunk/lib/CodeGen/CodeGenAction.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=266852&r1=266851&r2=266852&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Tue Apr 19 21:23:52 2016
@@ -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) {
More information about the cfe-commits
mailing list