[cfe-commits] r148744 - /cfe/trunk/lib/CodeGen/TargetInfo.cpp

Akira Hatanaka ahatanaka at mips.com
Mon Jan 23 15:18:57 PST 2012


Author: ahatanak
Date: Mon Jan 23 17:18:57 2012
New Revision: 148744

URL: http://llvm.org/viewvc/llvm-project?rev=148744&view=rev
Log:
Ignore return type if its size is zero.


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

Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=148744&r1=148743&r2=148744&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Mon Jan 23 17:18:57 2012
@@ -3222,11 +3222,12 @@
 }
 
 ABIArgInfo MipsABIInfo::classifyReturnType(QualType RetTy) const {
-  if (RetTy->isVoidType())
+  uint64_t Size = getContext().getTypeSize(RetTy);
+
+  if (RetTy->isVoidType() || Size == 0)
     return ABIArgInfo::getIgnore();
 
   if (isAggregateTypeForABI(RetTy)) {
-    uint64_t Size = getContext().getTypeSize(RetTy);
     if (Size <= 128) {
       if (RetTy->isAnyComplexType())
         return ABIArgInfo::getDirect();





More information about the cfe-commits mailing list