[LLVMdev] Print native code emitted by the JIT
Olivier Meurant
meurant.olivier at gmail.com
Mon Mar 30 07:07:34 PDT 2009
Hi everybody,
I'm toying with the Kaleidoscope example from the documentation (with
llvm 2.5) and I want to print out on stderr, the native code (X86)
emitted with the JIT.
I have found the "createMachineFunctionPrinterPass" function.
But when I add it to the FunctionPassManager (
OurFPM.add(createMachineFunctionPrinterPass(cerr, "")); ). I get an
error at runtime : "MachineFunction.cpp:378: static
llvm::MachineFunction& llvm::MachineFunction::get(const
llvm::Function*): Assertion `mc && "Call construct() method first to
allocate the object"' failed."
I have probably miss an initialization or something like this, but I
can't figure out. Do you have any ideas ?
Thanks.
Olivier.
More information about the llvm-dev
mailing list