Author: johannes
Date: Mon Oct  1 19:27:23 2007
New Revision: 42515

URL: http://llvm.org/viewvc/llvm-project?rev=42515&view=rev
Log:
Use getABITypeSizeInBits for superior checking.


Modified:
    llvm-gcc-4.0/trunk/gcc/llvm-types.cpp

Modified: llvm-gcc-4.0/trunk/gcc/llvm-types.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-types.cpp?rev=42515&r1=42514&r2=42515&view=diff

==============================================================================
--- llvm-gcc-4.0/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/llvm-types.cpp Mon Oct  1 19:27:23 2007
@@ -74,12 +74,11 @@
 static const Type * llvm_set_type(tree Tr, const Type *Ty) {
 
   // For x86 long double, llvm records the size of the data (80) while
-  // gcc's TYPE_SIZE including alignment padding.  Compensate.
+  // gcc's TYPE_SIZE including alignment padding.  getABITypeSizeInBits
+  // is used to compensate for this.
   assert((!TYPE_SIZE(Tr) || !Ty->isSized() || !isInt64(TYPE_SIZE(Tr), true) ||
-         getInt64(TYPE_SIZE(Tr), true) == 
getTargetData().getTypeSizeInBits(Ty) ||
-         (getTargetData().getTypeSizeInBits(Ty) == 80 &&
-          (getInt64(TYPE_SIZE(Tr), true) == 96 ||
-           getInt64(TYPE_SIZE(Tr), true) == 128)))
+         getInt64(TYPE_SIZE(Tr), true) == 
+            getTargetData().getABITypeSizeInBits(Ty))
          && "LLVM type size doesn't match GCC type size!");
 
   unsigned &TypeSlot = LTypesMap[Ty];


_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to