[LLVMdev] ExecutionEngine::create returns 0

Hendrik Boom hendrik at topoi.pooq.com
Sat Jun 7 08:24:41 PDT 2008


What does it mean when ExecutionEngine::create returns 0?

Here's a simplified example:

#include "llvm/Module.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"

main()
{
  llvm::Module * module = new llvm::Module("the module");
  llvm::ExecutionEngine *ee = llvm::ExecutionEngine::create(module);
  fprintf(stdout, "pointer is %x.\n", ee);
}

I discovered this with a more complicated example in which I got
a segmentation fault the moment I tried to use the created execution
engine for anything.


In case they are relevant, here are the commands I used to comile the thing

g++ -o broken.o -c -I/farhome/hendrik/dv/llvm/llvm/include -I/farhome/hendrik/dv/llvm/obj/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -g -Woverloaded-virtual broken.cpp
g++ -o broken broken.o /farhome/hendrik/dv/llvm/obj/Debug/lib/LLVMExecutionEngine.o /farhome/hendrik/dv/llvm/obj/Debug/lib/LLVMJIT.o -L/farhome/hendrik/dv/llvm/obj/Debug/lib -lpthread -ldl -lm -lLLVMCore -lLLVMSupport -lLLVMSystem -lLLVMAnalysis -lLLVMTarget -lLLVMSystem -lLLVMAsmParser -lLLVMCodeGen -lLLVMCore -lLLVMSupport

-- hendrik




More information about the llvm-dev mailing list