[LLVMdev] Are multiple execution engines allowed?

Chris Lattner sabre at nondot.org
Wed Feb 27 20:55:21 PST 2008


On Feb 27, 2008, at 5:30 PM, Robert Zeh wrote:

> I'm trying to set up some automated testing, and I'd like to have
> multiple instances of ExecutionEngines, so that the state from the
> first test doesn't alter the second state.

You can only have one instance of an EE alive at a time.  However, you  
should be able to create one, then delete it, then create one, then  
delete it etc.

> Right now I'm doing something along the lines of:
> 	Module *emptyModule = new Module("emptyModule");
> 	ExecutionEngine executionEngine =  
> ExecutionEngine::create(emptyModule);

It would be helpful to see the actual code, this clearly won't work:  
you can't have an EE on the stack.

-Chris




More information about the llvm-dev mailing list