]> granicus.if.org Git - clang/commitdiff
tame an assertion, fixing rdar://8357396
authorChris Lattner <sabre@nondot.org>
Thu, 26 Aug 2010 06:28:35 +0000 (06:28 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 26 Aug 2010 06:28:35 +0000 (06:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112174 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp
test/CodeGen/x86_64-arguments.c

index c5b858dbfabc14dbc761e3c170150b6dbcc0028f..78d7925a900c0537eae206734d8d1fcc477ef281 100644 (file)
@@ -1794,7 +1794,7 @@ llvm::Value *X86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
     assert(ST->getNumElements() == 2 && "Unexpected ABI info for mixed regs");
     const llvm::Type *TyLo = ST->getElementType(0);
     const llvm::Type *TyHi = ST->getElementType(1);
-    assert((TyLo->isFloatingPointTy() ^ TyHi->isFloatingPointTy()) &&
+    assert((TyLo->isFPOrFPVectorTy() ^ TyHi->isFPOrFPVectorTy()) &&
            "Unexpected ABI info for mixed regs");
     const llvm::Type *PTyLo = llvm::PointerType::getUnqual(TyLo);
     const llvm::Type *PTyHi = llvm::PointerType::getUnqual(TyHi);
index 039dd27869ba6f1551cc78873b049da53e0759be..210a44e104c1b5579a79cf95d4d88eb42489ac24 100644 (file)
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s| FileCheck %s
+#include <stdarg.h>
 
 // CHECK: %0 = type { i64, double }
 
@@ -225,3 +226,11 @@ _Complex float f32(_Complex float A, _Complex float B) {
 }
 
 
+// rdar://8357396
+struct f33s { long x; float c,d; };
+
+void f33(va_list X) {
+  va_arg(X, struct f33s);
+}
+
+