[llvm-commits] [llvm-gcc-4.2] r40000 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Wed Jul 18 04:40:26 PDT 2007


Author: baldrick
Date: Wed Jul 18 06:40:26 2007
New Revision: 40000

URL: http://llvm.org/viewvc/llvm-project?rev=40000&view=rev
Log:
For an sret call, we always have to push a pointer argument
giving where to place the result - otherwise LLVM will abort
because the function is called with the wrong number of
arguments.  Since DestLoc should hold the destination if
CALL_EXPR_RETURN_SLOT_OPT is true, just delete this test.

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=40000&r1=39999&r2=40000&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Jul 18 06:40:26 2007
@@ -2633,13 +2633,8 @@
       // Make sure this call is marked as 'struct return'.
       isStructRet = true;
       
-      // If the front-end has already made the argument explicit, don't do it
-      // again.
-      if (CALL_EXPR_RETURN_SLOT_OPT(CallExpression))
-        return;
-      
-      // Otherwise, we need to pass a buffer to return into.  If the caller uses
-      // the result, DestLoc will be set.  If it ignores it, it could be unset,
+      // We need to pass a buffer to return into.  If the caller uses the
+      // result, DestLoc will be set.  If it ignores it, it could be unset,
       // in which case we need to create a dummy buffer.
       if (DestLoc == 0)
         DestLoc = TheTreeToLLVM->CreateTemporary(PtrArgTy->getElementType());





More information about the llvm-commits mailing list