class LocalCXXRuntimeOverrides

Declaration

class LocalCXXRuntimeOverrides : public LocalCXXRuntimeOverridesBase { /* full declaration omitted */ };

Description

Support class for static dtor execution. For hosted (in-process) JITs only! If a __cxa_atexit function isn't found C++ programs that use static destructors will fail to link. However, we don't want to use the host process's __cxa_atexit, because it will schedule JIT'd destructors to run after the JIT has been torn down, which is no good. This class makes it easy to override __cxa_atexit (and the related __dso_handle). To use, clients should manually call searchOverrides from their symbol resolver. This should generally be done after attempting symbol resolution inside the JIT, but before searching the host process's symbol table. When the client determines that destructors should be run (generally at JIT teardown or after a return from main), the runDestructors method should be called.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h:190

Inherits from: LocalCXXRuntimeOverridesBase

Member Variables

Inherited from LocalCXXRuntimeOverridesBase:

protected DSOHandleOverride

Method Overview

  • public llvm::Error enable(llvm::orc::JITDylib & JD, llvm::orc::MangleAndInterner & Mangler)

Inherited from LocalCXXRuntimeOverridesBase:

Methods

ΒΆllvm::Error enable(
    llvm::orc::JITDylib& JD,
    llvm::orc::MangleAndInterner& Mangler)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h:192

Parameters

llvm::orc::JITDylib& JD
llvm::orc::MangleAndInterner& Mangler