search for: constant_begin

Displaying 2 results from an estimated 2 matches for "constant_begin".

2006 Mar 03
1
[LLVMdev] printing constants
...want to do. If you're > trying to print out > all of the literal constants in instructions in a > function, you can use > the llvm/Analysis/ConstantsScanner.h interface to do > this. Something like > this: > > Function *F = ... > for (constant_iterator I = constant_begin(F), E = > constant_end(F); > I != E; ++I) > std::cerr << *I; > > Given code like: > > X = add int Y, 1 > Z = mul int X, 17 > > It will print out 1 and 17. > > Is this what you mean? > > -Chris > > -- > http://nondot....
2006 Mar 02
1
[LLVMdev] Re: LLVMdev Digest, Vol 21, Issue 2
hello everybody, here I have a question regarding printing of the constants( like 2 .63 etc.,) present in the instruction while iterating over the instructions within a basic block . I am able to print the vaiables but not the constants. Can you please tell me how to get the constants printed out while iterating over the instructions because the constants do not have names as the variables do(