llvm-project/llvm/include/llvm-c
Wael Yehia 9559bd1990 [LTO][Legacy] Add new API to check presence of ctor/dtor functions.
On AIX, the linker needs to check whether a given lto_module_t contains
any constructor/destructor functions, in order to implement the behavior
of the -bcdtors:all flag. See
https://www.ibm.com/docs/en/aix/7.2?topic=l-ld-command for the flag's
documentation.
In llvm IR, constructor (destructor) functions are added to a special
global array @llvm.global_ctors (@llvm.global_dtors).
However, because these two symbols are artificial, they are not visited
during the symbol traversal (using the
lto_module_get_[num_symbols|symbol_name|symbol_attribute] API).

This patch adds a new function to the libLTO interface that checks the
presence of one or both of these two symbols.

Reviewed By: steven_wu

Differential Revision: https://reviews.llvm.org/D106887
2021-07-28 12:41:56 +00:00
..
Transforms [Coroutines] Run coroutine passes by default 2021-07-15 14:33:40 +08:00
Analysis.h
BitReader.h
BitWriter.h
Comdat.h [IR] Rename `comdat noduplicates` to `comdat nodeduplicate` 2021-07-20 12:47:10 -07:00
Core.h Intrinsic::getName: require a Module argument 2021-06-14 14:52:29 +02:00
DataTypes.h
DebugInfo.h Revert "[llvm] Sync DebugInfo.h with DebugInfoFlags.def" 2021-06-09 10:39:57 +02:00
Disassembler.h
DisassemblerTypes.h [llvm] Fix header guards (NFC) 2021-02-21 19:58:05 -08:00
Error.h
ErrorHandling.h [llvm] Fix header guards (NFC) 2021-02-21 19:58:05 -08:00
ExecutionEngine.h
ExternC.h [llvm] Fix header guards (NFC) 2021-02-21 19:58:05 -08:00
IRReader.h
Initialization.h
LLJIT.h Reland [Orc] Add verylazy example for C-bindings 2021-07-18 21:17:49 +02:00
Linker.h
Object.h
Orc.h Reland [Orc] Add verylazy example for C-bindings 2021-07-18 21:17:49 +02:00
OrcEE.h
Remarks.h
Support.h
Target.h
TargetMachine.h
Types.h
lto.h [LTO][Legacy] Add new API to check presence of ctor/dtor functions. 2021-07-28 12:41:56 +00:00
module.modulemap