diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-09-17 22:54:08 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-09-17 22:54:08 +0000 |
| commit | 4151972c22cfc914c91734a9bfc066ea6d3b5dc4 (patch) | |
| tree | 8694883d767695be64bc022d2737f8004f701d3c | |
| parent | 096cda11fcd9c8d9ac23942858a788df0090fbd4 (diff) | |
| download | bcm5719-llvm-4151972c22cfc914c91734a9bfc066ea6d3b5dc4.tar.gz bcm5719-llvm-4151972c22cfc914c91734a9bfc066ea6d3b5dc4.zip | |
Enable extra LTO verification only when build type is debug.
llvm-svn: 247956
| -rw-r--r-- | lld/COFF/SymbolTable.cpp | 6 |
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); |

