[LLVMdev] How to recognize global & local variable?
ukil.soumya at gmail.com
Wed Jul 21 05:27:19 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 ?
On 21 July 2010 16:07, Duncan Sands <baldrick at free.fr> wrote:
> 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)
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
soumya prasad ukil
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev