[llvm] r290416 - [ThinLTO] Verify lazy-loaded source module for function importing when assertions are enabled (NFC)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 23 10:10:23 PST 2016
> On Dec 23, 2016, at 4:50 AM, Peter Collingbourne <peter at pcc.me.uk> wrote:
>
>
>
> On Dec 23, 2016 5:26 AM, "Mehdi Amini via llvm-commits" <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
> Author: mehdi_amini
> Date: Thu Dec 22 23:16:19 2016
> New Revision: 290416
>
> URL: http://llvm.org/viewvc/llvm-project?rev=290416&view=rev <http://llvm.org/viewvc/llvm-project?rev=290416&view=rev>
> Log:
> [ThinLTO] Verify lazy-loaded source module for function importing when assertions are enabled (NFC)
>
> Modified:
> llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
>
> Modified: llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp?rev=290416&r1=290415&r2=290416&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp?rev=290416&r1=290415&r2=290416&view=diff>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp Thu Dec 22 23:16:19 2016
> @@ -697,6 +697,14 @@ Expected<bool> FunctionImporter::importF
> }
> }
>
> +#ifndef DEBUG
>
> NDEBUG?
Indeed! r290437.
Thanks.
Mehdi
>
> + // Note: this can't be done after `renameModuleForThinLTO` as it leaves the
> + // module in a state that does not pass the verifier (for example aliases
> + // pointing to available_externally functions).
> + if (verifyModule(*SrcModule, &errs()))
> + report_fatal_error("Invalid lazy-loaded source module for importing");
> +#endif
> +
> // Link in the specified functions.
> if (renameModuleForThinLTO(*SrcModule, Index, &GlobalsToImport))
> return true;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161223/4f32d3a4/attachment.html>
More information about the llvm-commits
mailing list