llvm-project/llvm/test/ExecutionEngine/OrcLazy
Sunho Kim 7d101e43cd [ORC][LLJIT] Define atexit symbol in GenericLLVMIRPlatformSupport.
Define atexit symbol in GenericLLVMIRPlatformSupport so that it doesn't need to be defined by user.

On windows, llvm codegen emits atexit runtime calls to support global deinitializers as there is no lower function like cxa_atexit as in Itanium C++ ABI. ORC JIT user had to define custom atexit symbol manually. This was a hassle as it has to deal with dso_handle and cxa_atexit internals of LLJIT. If client didn't provide atexit definition, the default behaviour is just linking with host atexit function which is destined to fail as it calls dtors when the host program exits. This is after jit instances and buffers are freed, so users would see weird access violation exception from the uknown location. (in console application, the debugger thinks exception happened in scrt_common_main_seh)

This is a hack that has some caveats. (e.g. memory address is not identical) But, it's better than the situation described in the above. Ultimately, we will move on to ORC runtime that is able to solve the memory address issue properly.

Reviewed By: sgraenitz

Differential Revision: https://reviews.llvm.org/D128037
2022-06-26 03:50:08 +09:00
..
Inputs
anonymous_globals.ll
bad-object-file.ll
basic-object-file-loading.ll
basic-whole-module-partitions.ll
common-symbols.ll
debug-descriptor-elf-minimal.ll
debug-objects-elf-minimal.ll
emulated-tls.ll
global-ctors-and-dtors.ll [ORC][LLJIT] Define atexit symbol in GenericLLVMIRPlatformSupport. 2022-06-26 03:50:08 +09:00
global_aliases.ll
hidden-visibility.ll
lit.local.cfg
macho-universal-static-library-support.ll
minimal-throw-catch.ll [NFC][llvm] Inclusive language: reword uses of sanity test and check 2021-11-25 07:21:42 -05:00
minimal.ll [NFC][llvm] Inclusive language: reword uses of sanity test and check 2021-11-25 07:21:42 -05:00
module-flags.ll
multiple-compile-threads-basic.ll [NFC] Disabled few tests with MemoryWithOrigins 2021-11-04 18:18:03 -07:00
printargv.ll Fix typo of colon to semicolon in lit tests 2021-10-09 10:03:50 +08:00
private_linkage.ll
single-function-call.ll [NFC][llvm] Inclusive language: reword uses of sanity test and check 2021-11-25 07:21:42 -05:00
static-initializers-in-objectfiles.ll
static-library-support.ll
weak-function.ll
weak-non-materialization.ll