[lld] r247956 - Enable extra LTO verification only when build type is debug.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 15:54:08 PDT 2015


Author: ruiu
Date: Thu Sep 17 17:54:08 2015
New Revision: 247956

URL: http://llvm.org/viewvc/llvm-project?rev=247956&view=rev
Log:
Enable extra LTO verification only when build type is debug.

Modified:
    lld/trunk/COFF/SymbolTable.cpp

Modified: lld/trunk/COFF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=247956&r1=247955&r2=247956&view=diff
==============================================================================
--- lld/trunk/COFF/SymbolTable.cpp (original)
+++ lld/trunk/COFF/SymbolTable.cpp Thu Sep 17 17:54:08 2015
@@ -410,8 +410,12 @@ std::vector<ObjectFile *> SymbolTable::c
   for (unsigned I = 1, E = BitcodeFiles.size(); I != E; ++I)
     CG->addModule(BitcodeFiles[I]->getModule());
 
+  bool DisableVerify = true;
+#ifdef NDEBUG
+  DisableVerify = false;
+#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);




More information about the llvm-commits mailing list