[PATCH] D12907: LLD: Enable extra LTO verification only when build type is debug

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 10:11:11 PDT 2015


ruiu created this revision.
ruiu added a reviewer: pcc.
ruiu added a subscriber: llvm-commits.

This is a follow-up patch for r247736 - LTO: Adjust to LLVM r247735.

http://reviews.llvm.org/D12907

Files:
  COFF/SymbolTable.cpp

Index: COFF/SymbolTable.cpp
===================================================================
--- COFF/SymbolTable.cpp
+++ COFF/SymbolTable.cpp
@@ -410,8 +410,12 @@
   for (unsigned I = 1, E = BitcodeFiles.size(); I != E; ++I)
     CG->addModule(BitcodeFiles[I]->getModule());
 
+  bool DisableVerify = false;
+#ifdef NDEBUG
+  DisableVerify = true;
+#endif
   std::string ErrMsg;
-  if (!CG->optimize(false, false, false, false, ErrMsg))
+  if (!CG->optimize(DisableVerify, false, false, false, ErrMsg))
     error(ErrMsg);
 
   Objs.resize(Config->LTOJobs);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12907.34902.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150916/1d2e1a5e/attachment.bin>


More information about the llvm-commits mailing list