[llvm-commits] [llvm-gcc-4.2] r42536 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Dale Johannesen
dalej at apple.com
Tue Oct 2 10:42:04 PDT 2007
Author: johannes
Date: Tue Oct 2 12:42:04 2007
New Revision: 42536
URL: http://llvm.org/viewvc/llvm-project?rev=42536&view=rev
Log:
Use getABITypeSizeInBits for improved type checking.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=42536&r1=42535&r2=42536&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Tue Oct 2 12:42:04 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];
More information about the llvm-commits
mailing list