Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more places.
Enable enableDebugTypeODRUniquing() for ThinLTO backends invoked via
libLTO, similar to the way r266549 enabled this for ThinLTO backend
threads launched from gold-plugin.
Also enable enableDebugTypeODRUniquing in opt, similar to the way
r266549 enabled this for llvm-link (on by default, can be disabled with
new -disable-debug-info-type-map option), since we may perform ThinLTO
importing from opt.
Reviewers: dexonsmith, joker.eph
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266746
91177308-0d34-0410-b5e6-
96231b3b80d8
Pool.async([&](int count) {
LLVMContext Context;
Context.setDiscardValueNames(LTODiscardValueNames);
+ Context.enableDebugTypeODRUniquing();
auto ModuleIdentifier = ModuleBuffer.getBufferIdentifier();
DenseMap<GlobalValue::GUID, GlobalValue::LinkageTypes> ResolvedODR;
VerifyEach("verify-each", cl::desc("Verify after each transform"));
static cl::opt<bool>
+ DisableDITypeMap("disable-debug-info-type-map",
+ cl::desc("Don't use a uniquing type map for debug info"));
+
+static cl::opt<bool>
StripDebug("strip-debug",
cl::desc("Strip debugger symbol info from translation unit"));
SMDiagnostic Err;
Context.setDiscardValueNames(DiscardValueNames);
+ if (!DisableDITypeMap)
+ Context.enableDebugTypeODRUniquing();
// Load the input module...
std::unique_ptr<Module> M = parseIRFile(InputFilename, Err, Context);