MCPcopy Create free account
hub / github.com/apache/arrow / AddProcessSymbol

Function AddProcessSymbol

cpp/src/gandiva/engine.cc:187–197  ·  view source on GitHub ↗

add current process symbol to dylib LLVM >= 18 does this automatically

Source from the content-addressed store, hash-verified

185// add current process symbol to dylib
186// LLVM >= 18 does this automatically
187void AddProcessSymbol(llvm::orc::LLJIT& lljit) {
188 lljit.getMainJITDylib().addGenerator(
189 llvm::cantFail(llvm::orc::DynamicLibrarySearchGenerator::GetForCurrentProcess(
190 lljit.getDataLayout().getGlobalPrefix())));
191 // the `atexit` symbol cannot be found for ASAN
192#if defined(ADDRESS_SANITIZER) && LLVM_VERSION_MAJOR < 18
193 if (!lljit.lookup("atexit")) {
194 AddAbsoluteSymbol(lljit, "atexit", reinterpret_cast<void*>(atexit));
195 }
196#endif
197}
198
199#ifdef JIT_LINK_SUPPORTED
200Result<std::unique_ptr<llvm::jitlink::InProcessMemoryManager>> CreateMemmoryManager() {

Callers 1

BuildJITFunction · 0.85

Calls 2

AddAbsoluteSymbolFunction · 0.85
lookupMethod · 0.80

Tested by

no test coverage detected