]> granicus.if.org Git - clang/commitdiff
Use ABIArgInfo::getDirect() for all types that have a pointer representation.
authorAnders Carlsson <andersca@mac.com>
Sat, 26 Sep 2009 03:56:53 +0000 (03:56 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 26 Sep 2009 03:56:53 +0000 (03:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82845 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetABIInfo.cpp
test/CodeGenObjC/variadic-sends.m

index da30060ecde2f3d94eb245e8bd57117a812896a2..010a42182135491bf89ee1787b54cb1b74997f75 100644 (file)
@@ -836,7 +836,7 @@ ABIArgInfo X86_64ABIInfo::getCoerceResult(QualType Ty,
   if (CoerceTo == llvm::Type::getInt64Ty(CoerceTo->getContext())) {
     // Integer and pointer types will end up in a general purpose
     // register.
-    if (Ty->isIntegralType() || Ty->isPointerType())
+    if (Ty->isIntegralType() || Ty->hasPointerRepresentation())
       return (Ty->isPromotableIntegerType() ?
               ABIArgInfo::getExtend() : ABIArgInfo::getDirect());
   } else if (CoerceTo == llvm::Type::getDoubleTy(CoerceTo->getContext())) {
index 17fe6618a3f97d4fb52fa39d92223e7770e66109..8697feec5d6d4f991c92c3e367fbb9780eb16fec 100644 (file)
@@ -9,19 +9,19 @@
 
 void f0(A *a) {
   // CHECK-X86-32: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*)*)
-  // CHECK-X86-64: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i64, %struct.objc_selector*)*)
+  // CHECK-X86-64: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*)*)
   [a im0];
 }
 
 void f1(A *a) {
   // CHECK-X86-32: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*, i32)*)
-  // CHECK-X86-64: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i64, %struct.objc_selector*, i32)*)
+  // CHECK-X86-64: call void bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*, i32)*)
   [a im1: 1];
 }
 
 void f2(A *a) {
   // CHECK-X86-32: call void (i8*, %struct.objc_selector*, i32, i32, ...)* bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*, i32, i32, ...)*)
-  // CHECK-X86-64: call void (i64, %struct.objc_selector*, i32, i32, ...)* bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i64, %struct.objc_selector*, i32, i32, ...)*)
+  // CHECK-X86-64: call void (i8*, %struct.objc_selector*, i32, i32, ...)* bitcast (i8* (i8*, %struct.objc_selector*, ...)* @objc_msgSend to void (i8*, %struct.objc_selector*, i32, i32, ...)*)
   [a im2: 1, 2];
 }