[llvm] [CodeGen] Don't codegen the weak function when there is a defined non-weak symbol (PR #76040)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 21 17:06:20 PST 2023


DianQK wrote:

>From https://github.com/llvm/llvm-project/blob/7c3b67d2038cfb48a80299089f6a1308eee1df7f/llvm/include/llvm/Object/ModuleSymbolTable.h#L52-L59, I can handle it at LTO.
This is the better approach for me. Marked as a draft as I am preparing a new PR.

It seems that `.lto_discard` can be used to handle the presence of a weak and a global symbol in the inline asm. But I want to drop the weak function defined in IR.


https://github.com/llvm/llvm-project/pull/76040


More information about the llvm-commits mailing list