aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-26 06:28:35 +0000
committerChris Lattner <sabre@nondot.org>2010-08-26 06:28:35 +0000
commita8b7a7d3eaa51dd200cba1e5541f2542d24d7a6e (patch)
tree5e32ea85eb261844d98b52a2e67b6ba78aa9dbbd
parent77c059060f9c8c121d5e8b76957d187223677558 (diff)
tame an assertion, fixing rdar://8357396
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112174 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/TargetInfo.cpp2
-rw-r--r--test/CodeGen/x86_64-arguments.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index c5b858dbfa..78d7925a90 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -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);
diff --git a/test/CodeGen/x86_64-arguments.c b/test/CodeGen/x86_64-arguments.c
index 039dd27869..210a44e104 100644
--- a/test/CodeGen/x86_64-arguments.c
+++ b/test/CodeGen/x86_64-arguments.c
@@ -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);
+}
+
+