[LLVMdev] finding implicit casts

John Trimble trimblej at gmail.com
Tue Apr 25 19:14:40 PDT 2006


I'm trying to find all the implicit casts in a program compiled with
llvm-gcc. What I've been doing is for each function taking all the
instruction and going through each of their operands (and the opreands of
their operands etc...) and checking to see if any are an instance of
UnaryConstantExpr. When I encounter such an instance, I determine whether
the type of that value and its 0th operand differ, if they do its an
implicit cast. I do basically the same procedure for the the global
variables. Is this the best approach to take or is there a better way of
going about this?

I've asked at least a few questions on this mailing-list and you have all
been VERY helpful. Thank you all so much.

--
John Trimble
Research Assistant
University of Arizona
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060425/a7026117/attachment.html>


More information about the llvm-dev mailing list