[cfe-commits] r63859 - /cfe/trunk/lib/CodeGen/CGCall.cpp

Daniel Dunbar daniel at zuster.org
Thu Feb 5 01:24:54 PST 2009


Author: ddunbar
Date: Thu Feb  5 03:24:53 2009
New Revision: 63859

URL: http://llvm.org/viewvc/llvm-project?rev=63859&view=rev
Log:
Simplify test for whether we need an alloca to hold an indirect return
value.
 - No functionality change.

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=63859&r1=63858&r2=63859&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Feb  5 03:24:53 2009
@@ -1337,19 +1337,9 @@
   // location that we would like to return into.
   QualType RetTy = CallInfo.getReturnType();
   const ABIArgInfo &RetAI = CallInfo.getReturnInfo();
-  switch (RetAI.getKind()) {
-  case ABIArgInfo::Indirect:
+  if (CGM.ReturnTypeUsesSret(CallInfo)) {
     // Create a temporary alloca to hold the result of the call. :(
     Args.push_back(CreateTempAlloca(ConvertType(RetTy)));
-    break;
-    
-  case ABIArgInfo::Direct:
-  case ABIArgInfo::Ignore:
-  case ABIArgInfo::Coerce:
-    break;
-
-  case ABIArgInfo::Expand:
-    assert(0 && "Invalid ABI kind for return argument");
   }
   
   assert(CallInfo.arg_size() == CallArgs.size() &&





More information about the cfe-commits mailing list