[llvm-commits] [llvm-gcc-4.2] r46291 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp

Evan Cheng evan.cheng at apple.com
Wed Jan 23 15:44:37 PST 2008


Author: evancheng
Date: Wed Jan 23 17:44:36 2008
New Revision: 46291

URL: http://llvm.org/viewvc/llvm-project?rev=46291&view=rev
Log:
Pointer's are also consider integer types. So %struct.datum = type { i8*, i32 } should not be passed by ByVal.

Modified:
    llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp

Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=46291&r1=46290&r2=46291&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Wed Jan 23 17:44:36 2008
@@ -681,9 +681,11 @@
 /* Returns true if all elements of the type are integer types. */
 static bool llvm_x86_is_all_integer_types(const Type *Ty) {
   for (Type::subtype_iterator I = Ty->subtype_begin(), E = Ty->subtype_end();
-       I != E; ++I)
-    if (!I->get()->isIntOrIntVector())
+       I != E; ++I) {
+    const Type *STy = I->get();
+    if (!STy->isIntOrIntVector() && STy->getTypeID() != Type::PointerTyID)
       return false;
+  }
   return true;
 }
 





More information about the llvm-commits mailing list