[LLVMdev] How to recognize global & local variable?
baldrick at free.fr
Wed Jul 21 05:51:00 PDT 2010
> Yeah that's true. But I want somewhat different. Through Instruction how
> do u know that? If an instruction like %a = alloca i32 is there, how to
> get the variable 'a' ? Then on that variable we can check as you have
> said Right? How to capture that variable ?
I didn't understand the question. There is no difference between "%a"
and the alloca instruction, "%a" is just a name given to the instruction
and exists only to make the IR more readable for humans. If you want to
use "%a" somewhere, just pass the alloca instruction.
More information about the llvm-dev