llvm-project/llvm/test/tools/llvm-link
Jeroen Dobbelaere 90a6bb30fa [remangleIntrinsicFunction] Detect and resolve name clash
It is possible that the remangled name for an intrinsic already exists with a different (and wrong) prototype within the module.
As the bitcode reader keeps both versions of all remangled intrinsics around for a longer time, this can result in a
crash, as can be seen in https://bugs.llvm.org/show_bug.cgi?id=50923

This patch makes 'remangleIntrinsicFunction' aware of this situation. When it is detected, it moves the version with the wrong prototype to a different name. That version will be removed anyway once the module is completely loaded.

With thanks to @asbirlea for reporting this issue when trying out an lto build with the full restrict patches, and @efriedma for suggesting a sane resolution mechanism.

Reviewed By: apilipenko

Differential Revision: https://reviews.llvm.org/D105118
2021-07-13 11:21:12 +02:00
..
Inputs [remangleIntrinsicFunction] Detect and resolve name clash 2021-07-13 11:21:12 +02:00
archive-bad.ll [llvm-link] use file magic when deciding if input should be loaded as archive 2020-12-02 17:21:34 -08:00
archive-only-needed.ll [llvm-link] fix linker behavior when linking archives with --only-needed option 2021-01-05 10:02:51 -08:00
archive.ll [llvm-link] use file magic when deciding if input should be loaded as archive 2020-12-02 17:21:34 -08:00
archivell.ll
remangle.ll [remangleIntrinsicFunction] Detect and resolve name clash 2021-07-13 11:21:12 +02:00