Darwin x86-32 ABI: Now that structure passing is farther along, we
don't need special treatment for unions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71559 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index a142729..1df9b0b 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -446,18 +446,11 @@
       }
     }
 
-    uint64_t Size = Context.getTypeSize(RetTy);
-    if (isRegisterSize(Size)) {
-      // Always return in register for unions for now.
-      // FIXME: This is wrong, but better than treating as a
-      // structure.
-      if (RetTy->isUnionType())
-        return ABIArgInfo::getCoerce(llvm::IntegerType::get(Size));
-
-      // Small structures which are register sized are generally returned
-      // in a register.
-      if (X86_32ABIInfo::shouldReturnTypeInRegister(RetTy, Context))
-        return ABIArgInfo::getCoerce(llvm::IntegerType::get(Size));
+    // Small structures which are register sized are generally returned
+    // in a register.
+    if (X86_32ABIInfo::shouldReturnTypeInRegister(RetTy, Context)) {
+      uint64_t Size = Context.getTypeSize(RetTy);
+      return ABIArgInfo::getCoerce(llvm::IntegerType::get(Size));
     }
 
     return ABIArgInfo::getIndirect(0);