[cfe-commits] r82845 - in /cfe/trunk: lib/CodeGen/TargetABIInfo.cpp test/CodeGenObjC/variadic-sends.m

Anders Carlsson andersca at mac.com
Fri Sep 25 20:56:54 PDT 2009


Author: andersca
Date: Fri Sep 25 22:56:53 2009
New Revision: 82845

URL: http://llvm.org/viewvc/llvm-project?rev=82845&view=rev
Log:
Use ABIArgInfo::getDirect() for all types that have a pointer representation.

Modified:
    cfe/trunk/lib/CodeGen/TargetABIInfo.cpp
    cfe/trunk/test/CodeGenObjC/variadic-sends.m

Modified: cfe/trunk/lib/CodeGen/TargetABIInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetABIInfo.cpp?rev=82845&r1=82844&r2=82845&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/TargetABIInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetABIInfo.cpp Fri Sep 25 22:56:53 2009
@@ -836,7 +836,7 @@
   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())) {

Modified: cfe/trunk/test/CodeGenObjC/variadic-sends.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/variadic-sends.m?rev=82845&r1=82844&r2=82845&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenObjC/variadic-sends.m (original)
+++ cfe/trunk/test/CodeGenObjC/variadic-sends.m Fri Sep 25 22:56:53 2009
@@ -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];
 }
 





More information about the cfe-commits mailing list