[llvm-commits] [llvm] r117061 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Duncan Sands baldrick at free.fr
Sun Oct 31 06:00:55 PDT 2010


Hi Michael,

>> 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.

for example you can use the following testcase.  Unfortunately it passes
"by accident" (i.e. fltused is output in windows systems): because LLVM
doesn't currently support exception handling on windows, the invoke is
turned into a call and your logic fires.  You can check in the debugger
that if you target linux (or tell LLVM that windows does support exception
handling) then your logic is never reached, so fltused would not be output
even though it should be.

Ciao,

Duncan.

define void @foo() nounwind {
entry:
   invoke void (...)* @varargs(double 1.000000e+000)
     to label %ret unwind label %ret
ret:
   ret void
}

declare void @varargs(...)



More information about the llvm-commits mailing list