llvm-project/llvm/test/tools/llvm-link/Inputs
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
..
f.ll
g.ll
h.ll
i.ll
remangle1.ll [remangleIntrinsicFunction] Detect and resolve name clash 2021-07-13 11:21:12 +02:00
remangle2.ll [remangleIntrinsicFunction] Detect and resolve name clash 2021-07-13 11:21:12 +02:00