aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/KnownBitsTest.cpp
diff options
context:
space:
mode:
authorSunho Kim <ksunhokim123@gmail.com>2022-06-26 03:49:05 +0900
committerSunho Kim <ksunhokim123@gmail.com>2022-06-26 03:50:08 +0900
commit7d101e43cd8afe7368c2180ce33b70b71572e846 (patch)
tree8a051f401d9e50cd96bc80330c6cf76eb22e0409 /llvm/unittests/Support/KnownBitsTest.cpp
parent9803b0d1e7b3cbcce33c1c91d4e1cd1f20eea3d4 (diff)
downloadllvm-7d101e43cd8afe7368c2180ce33b70b71572e846.zip
llvm-7d101e43cd8afe7368c2180ce33b70b71572e846.tar.gz
llvm-7d101e43cd8afe7368c2180ce33b70b71572e846.tar.bz2
[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
Diffstat (limited to 'llvm/unittests/Support/KnownBitsTest.cpp')
0 files changed, 0 insertions, 0 deletions