I want to use Function::Create
method to create a function whose input parameter type is llvm::Instruction*
but I didn't find any direct method in class Type
to do that. Can anyone give me some hints?
Also For a concrete compare Instruction *pi
, I tried pi->getType()->print(errs())
and it returned me i1
as type. But when I wrote a function int externalCall(Instruction *p)
in another cpp file and compiled into IR. This IR says the type is class.llvm::Instruction
. Why this two are different and how can I get the latter one from the API?