[LLVMdev] How to check if an Instruction is still in a Function

Jianzhou Zhao jianzhou at seas.upenn.edu
Sun Feb 28 11:11:02 PST 2010


Hi,

Given an instruction ptr instr, and a Function ptr func,
can I simply check if func == instr->get_parent()->get_parent() to see if
this instruction is still in this Function?

We can also look up this instruction in the blocks of this function.
But this may take more time.

Thanks.
-- 
Jianzhou



More information about the llvm-dev mailing list