[LLVMdev] Interpreter Destructor

David Bertouille dbertouille at franticfilms.com
Wed Jul 1 08:28:57 PDT 2009

I have come across the issue where repeatedly creating and deleting an 
interpreter can cause incorrect external functions to be called.  The 
issue had to do with the ManagedStatic map Functions in 
ExecutionEngine/Interpreter/ExternalFunctions.cpp.  I was able to fix 
this by calling llvm_shutdown() when I delete the interpreter. 

Is it necessary to delete all ManagedStatic objects to delete and 
recreate an Interpreter?  Would it not be better to clear the Functions 
map in the Interpreter desctructor since it data in it may no longer be 

-David Bertouille

More information about the llvm-dev mailing list