Re: [CIL users] How to compare Lval and String

2012-05-23 Thread Gabriel Kerneis
Hi, On Wed, May 23, 2012 at 11:22:23PM +0530, srikanth vaindam wrote: > A Call instruction in CIL is: Call(lval, exp, explist, loc) where exp is the > name of the function that is being called. So, I want to compare this exp > with a string "sum" (which is the name of the function I am interested

Re: [CIL users] How to compare Lval and String

2012-05-23 Thread Jesse M Draper
If Cil is open (for d_exp) and Pretty is open (for sprint), you can convert an exp to a string with something like this: let expname e = sprint 80 (d_exp () e) The 80 is a width and won't work for an exp whose name is longer than that, but this has worked for me. There are undoubtedly more e

[CIL users] How to compare Lval and String

2012-05-23 Thread srikanth vaindam
I want to find out if a call is made to a particular function. (say the function "sum"). A Call instruction in CIL is: Call(lval, exp, explist, loc) where exp is the name of the function that is being called. So, I want to compare this exp with a string "sum" (which is the name of the function I a