[LLVMdev] How to recognize global & local variable?

Duncan Sands baldrick at free.fr
Wed Jul 21 03:37:11 PDT 2010


Hi Soumya_Prasad_Ukil,

> Can you guys tell how to recognize local & global variables ? Is there
> any macro on Value* defined in LLVM?

Global variable: isa<GlobalVariable>(V)
Local variable: isa<AllocaInst>(V)

Ciao,

Duncan.



More information about the llvm-dev mailing list