Displaying 1 result from an estimated 1 matches for "mcp_trace_instruction".
2007 Aug 17
1
[LLVMdev] Inserting trace information during opt transformations
...truction, 'disassembling' it to an
ostringstream then turning it into a constant array):
std::ostringstream instr;
(*wp)->print(instr);
Constant *itext = ConstantArray::get(instr.str());
This bit seems OK. I am calling a function in my run time system with
the signature
void mcp_trace_instruction(const char *)
by first declaring it inside doInitialization():
virtual bool doInitialization(Module &M)
{
std::vector<const Type*> args;
args.push_back(PointerType::get(Type::Int8Ty));
FunctionType *FT = FunctionType::get(Type::VoidTy, args, false);
TraceFunc = M.getOrInser...