summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/COFF/SymbolTable.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lld/COFF/SymbolTable.cpp b/lld/COFF/SymbolTable.cpp
index 23c79ca936c..db7fc8ff027 100644
--- a/lld/COFF/SymbolTable.cpp
+++ b/lld/COFF/SymbolTable.cpp
@@ -410,8 +410,12 @@ std::vector<ObjectFile *> SymbolTable::createLTOObjects(LTOCodeGenerator *CG) {
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);
OpenPOWER on IntegriCloud