Soumya_Prasad_Ukil
2010-Jul-20 21:42 UTC
[LLVMdev] How to recognize global & local variable?
Can you guys tell how to recognize local & global variables ? Is there any macro on Value* defined in LLVM? -- regards, soumya prasad ukil -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100721/cdc89d56/attachment.html>
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.
Soumya_Prasad_Ukil
2010-Jul-21 12:27 UTC
[LLVMdev] How to recognize global & local variable?
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) > > Ciao, > > Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- regards, soumya prasad ukil -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100721/41d11ab6/attachment.html>