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

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 19:47:55 PDT 2015


lgtm

On Wed, Sep 16, 2015 at 05:11:11PM +0000, Rui Ueyama wrote:
> 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);
> 
> 

> 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);


-- 
Peter


More information about the llvm-commits mailing list