[llvm-commits] [llvm] r117061 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Michael Spencer
bigcheesegs at gmail.com
Sat Oct 30 10:17:04 PDT 2010
Sorry for the lag. I'm still trying to get my filters setup correctly
to yell at me when someone replies to a commit I made. It's hard
because my email address isn't in any of the headers ;/.
On Fri, Oct 22, 2010 at 9:55 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Michael, how about a testcase?
There already is one, but it doesn't check indirect calls. I can add that.
>> + // See if any floating point values are being passed to this function. This is
>> + // used to emit an undefined reference to fltused on Windows.
>> + const FunctionType *FT =
>> + cast<FunctionType>(I.getCalledValue()->getType()->getContainedType(0));
>
> how about casting to PointerType and using getElementType instead. Actually,
> I'm surprised that there isn't a convenience function for getting the type of
> the callee as a FunctionType - want to add one to CallInst?
I was surprised too at how complicated it was to get the function
type. I didn't add it to CallInst because I'm not sure this is a
stable or proper way to get it. I'll add the method you suggested to
CallInst.
> Finally - what if this is an invoke rather than a normal call?
I have not been able to test this yet. I've never used invoke and I'm
not sure when clang would generate one in C.
> Ciao,
>
> Duncan.
Thanks,
- Michael Spencer
More information about the llvm-commits
mailing list