[llvm-commits] [126899] Revert previous patch.
dpatel at apple.com
dpatel at apple.com
Fri May 4 16:10:13 PDT 2007
Revision: 126899
Author: dpatel
Date: 2007-05-04 16:10:12 -0700 (Fri, 04 May 2007)
Log Message:
-----------
Revert previous patch. It does not
handle all cases properly.
Modified Paths:
--------------
apple-local/branches/llvm/gcc/llvm-types.cpp
Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-04 21:44:39 UTC (rev 126898)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-05-04 23:10:12 UTC (rev 126899)
@@ -1452,22 +1452,10 @@
"LLVM type size doesn't match GCC type size!");
uint64_t LLVMLastElementEnd = Info.getNewElementByteOffset(1);
const Type *PadTy = Type::Int8Ty;
- if (GCCTypeSize-LLVMLastElementEnd != 1) {
- unsigned Int32ArraySize = (GCCTypeSize-LLVMStructSize)/4;
- unsigned Int8ArraySize = (GCCTypeSize-LLVMStructSize) % 4;
- if (Int32ArraySize != 0) {
- PadTy = ArrayType::get(Type::Int32Ty, Int32ArraySize);
- Info.addElement(PadTy, GCCTypeSize - LLVMLastElementEnd,
- Int32ArraySize);
- }
- if (Int8ArraySize != 0) {
- PadTy = ArrayType::get(Type::Int8Ty, Int8ArraySize);
- Info.addElement(PadTy, GCCTypeSize - Info.getNewElementByteOffset(1),
- Int8ArraySize);
- }
- } else
- Info.addElement(PadTy, GCCTypeSize - LLVMLastElementEnd,
- GCCTypeSize - LLVMLastElementEnd);
+ if (GCCTypeSize-LLVMLastElementEnd != 1)
+ PadTy = ArrayType::get(PadTy, GCCTypeSize-LLVMStructSize);
+ Info.addElement(PadTy, GCCTypeSize-LLVMLastElementEnd,
+ GCCTypeSize-LLVMLastElementEnd);
}
}
More information about the llvm-commits
mailing list