LLVM Insert function call defined from another file -



LLVM Insert function call defined from another file -

i want insert function before instruction function phone call defined in file. tried

irbuilder<> builder(pi); callinst *callone = builder.createcall(func_ins, "foo");

where func_ins func*(or value* more general) , foo variable name prefix of calling function got assigned. since function defined in file i've no thought pointer func_ins should point set null didn't work.

can give me hints on how resolve problem?

one more issue can utilize writebitcodetofile dump instrumented code has external function phone call file because i‘m wondering may study referencing function in module or broken module while performing module checking?

you may phone call function same module, , may not utilize null callee.

if function defined in module, need first declare in module in want create call, create phone call using declaration.

to declare it, create identical function in new module (via function::create) , don't assign body.

llvm llvm-ir

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -