One question on runJITOnFunction() in JIT.cpp in llvm-2.6

Dear all,
I have a question on the runJITOnFunction() function in JIT.cpp. The second argument MCI must be used to create a MCIListener in the runJITOnFunction() function. However, the JIT::recompileAndRelinkFunction() just calls the runJITOnFunction() like this: " runJITOnFunction(F);", leaving the second argument, the MCI, empty.

As a result, if the call the recompileAndRelinkFunction() for a function for the first time, everything is fine, if I re-JIT the same function again, a segment fault occur, because the MCIListener class needs to use MCI like this: “MCI->setAddress(Code);”.

How to make re-JIT work, please? For example, sometimes I need to JIT a function for the first time, and modify its llvm code in the function body, and re-JIT it again.