[LLVMdev] How can I get the destination operand of an instruction?
Duncan Sands
baldrick at free.fr
Wed May 9 07:38:04 PDT 2012
Hi,
> Sorry, I have typo in my question.
> I will be careful next time.
>
> This is how I obtain the source operands of an instruction.
> // -----------------------------------------------------------------
> BasicBlock::iterator it;
> ...
> for(int k=0; k<OpNum; k++){
> errs()<<it->getOperand(k)<<" ";
try this:
it->getOperand(k)->dump()
> }
> ...
> // --------------------------------------------------------------------
>
> Also I try
> it->getVaueID(), and it->InstructionVal
> to get destination operand.
What do you mean by "destination operand"?
Ciao, Duncan.
More information about the llvm-dev
mailing list