[LLVMdev] How to assign undef value to a variable

John Criswell criswell at illinois.edu
Sun Jun 27 11:03:51 PDT 2010


Simply create an undef constant value and add a store instruction to store the undef value into the memory allocated by the alloca.

I believe there is an llvm::Undef class.  Check doxygen docs for details.


-----Original Message-----
From: Chayan Sarkar <chayan.ju at gmail.com>
Sent: Sunday, June 27, 2010 12:05 PM
To: llvmdev at cs.uiuc.edu <llvmdev at cs.uiuc.edu>; chayan.ju at gmail.com <chayan.ju at gmail.com>
Subject: [LLVMdev] How to assign undef value to a variable

Hi,

Can any one tell me how to assign 'undef' to variable? I want to
assign each variable an undef, immediately after the alloca
instruction.

Regards,
Chayan
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list