[LLVMdev] Distinguishing Pointer Variable and Ordinary Variable

Duncan Sands baldrick at free.fr
Mon Sep 2 03:08:48 PDT 2013


> Not all pointers will come (directly or indirectly) from an
> AllocaInst. You might just want
> isa<PointerType>(instr->getOperand(1)->getType()), though of course
> that'll be true for any memory operand of a store instruction.

isa<PointerType>(instr->getOperand(0)->getType()) will check if a pointer
is being stored.

Ciao, Duncan.



More information about the llvm-dev mailing list