diff options
author | Amanieu d'Antras <amanieu@gmail.com> | 2022-06-16 21:31:33 +0100 |
---|---|---|
committer | Amanieu d'Antras <amanieu@gmail.com> | 2022-06-16 21:36:39 +0100 |
commit | caa2a829cdf905a5e8664d96a464d414b2adb42e (patch) | |
tree | aedeeecd14add2d321675c08fe4e417a4fe6d9dc /llvm/lib/Object/COFFObjectFile.cpp | |
parent | decb600b02135ecd352239add1896de31a2d87b6 (diff) | |
download | llvm-caa2a829cdf905a5e8664d96a464d414b2adb42e.zip llvm-caa2a829cdf905a5e8664d96a464d414b2adb42e.tar.gz llvm-caa2a829cdf905a5e8664d96a464d414b2adb42e.tar.bz2 |
[MergeFunctions] Preserve symbols used llvm.used/llvm.compiler.used
llvm.used and llvm.compiler.used are often used with inline assembly
that refers to a specific symbol so that the symbol is kept through to
the linker even though there are no references to it from LLVM IR.
This fixes the MergeFunctions pass to preserve references to these
symbols in llvm.used/llvm.compiler.used so they are not deleted from the
IR. This doesn't prevent these functions from being merged, but
guarantees that an alias or thunk with the expected symbol name is kept
in the IR.
Differential Revision: https://reviews.llvm.org/D127751
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions