CppInterOp
C++ Language Interoperability Layer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Cpp::InterpreterShutdown Struct Reference

RAII guard whose dtor calls llvm_shutdown for the owned-interpreter case. More...

Public Member Functions

 ~InterpreterShutdown ()
 

Detailed Description

RAII guard whose dtor calls llvm_shutdown for the owned-interpreter case.

Constructed as a function-local static AFTER sInterpreters, so its dtor fires FIRST (reverse-of-construction); llvm_shutdown then drains the ManagedStatic registry, including sInterpreters, deterministically. The llvm_shutdown call itself is gated on LLVM 23+, where Platform::lookupResolvedInitSymbols (llvm/llvm-project#196874) makes ~Interpreter's JIT deinit skip lazy materialization. On older LLVM the same chain SEGFAULTs in cleanUp against destroyed function-local statics, so the dtor is a no-op and sInterpreters leaks instead.

Definition at line 225 of file CppInterOp.cpp.

Constructor & Destructor Documentation

◆ ~InterpreterShutdown()

Cpp::InterpreterShutdown::~InterpreterShutdown ( )
inline

Definition at line 226 of file CppInterOp.cpp.

References Cpp::SkipShutDown.


The documentation for this struct was generated from the following file: