[PATCH] D19263: Enable ODR uniquing of DITypes in more places

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 08:54:11 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL266746: Enable ODR uniquing of DITypes in more places (authored by tejohnson).

Changed prior to commit:
  http://reviews.llvm.org/D19263?vs=54197&id=54204#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19263

Files:
  llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
  llvm/trunk/tools/opt/opt.cpp

Index: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
===================================================================
--- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
+++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -575,6 +575,7 @@
       Pool.async([&](int count) {
         LLVMContext Context;
         Context.setDiscardValueNames(LTODiscardValueNames);
+        Context.enableDebugTypeODRUniquing();
         auto ModuleIdentifier = ModuleBuffer.getBufferIdentifier();
 
         DenseMap<GlobalValue::GUID, GlobalValue::LinkageTypes> ResolvedODR;
Index: llvm/trunk/tools/opt/opt.cpp
===================================================================
--- llvm/trunk/tools/opt/opt.cpp
+++ llvm/trunk/tools/opt/opt.cpp
@@ -102,6 +102,10 @@
 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"));
 
@@ -365,6 +369,8 @@
   SMDiagnostic Err;
 
   Context.setDiscardValueNames(DiscardValueNames);
+  if (!DisableDITypeMap)
+    Context.enableDebugTypeODRUniquing();
 
   // Load the input module...
   std::unique_ptr<Module> M = parseIRFile(InputFilename, Err, Context);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19263.54204.patch
Type: text/x-patch
Size: 1372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160419/b22e7dc3/attachment.bin>


More information about the llvm-commits mailing list