[cfe-commits] r44798 - in /cfe/trunk: CodeGen/CodeGenTypes.cpp test/CodeGen/struct.c
Devang Patel
dpatel at apple.com
Mon Dec 10 10:25:36 PST 2007
Author: dpatel
Date: Mon Dec 10 12:25:34 2007
New Revision: 44798
URL: http://llvm.org/viewvc/llvm-project?rev=44798&view=rev
Log:
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
Modified:
cfe/trunk/CodeGen/CodeGenTypes.cpp
cfe/trunk/test/CodeGen/struct.c
Modified: cfe/trunk/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CodeGenTypes.cpp?rev=44798&r1=44797&r2=44798&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/CodeGen/CodeGenTypes.cpp Mon Dec 10 12:25:34 2007
@@ -459,7 +459,7 @@
} else {
ExtraBits = 0;
const llvm::Type *Ty = CGT.ConvertType(FD->getType());
- addLLVMField(Ty, CGT.getTargetData().getTypeSizeInBits(Ty), FD, 0, 0);
+ addLLVMField(Ty, CGT.getTargetData().getABITypeSizeInBits(Ty), FD, 0, 0);
}
}
STy = llvm::StructType::get(LLVMFields);
Modified: cfe/trunk/test/CodeGen/struct.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/struct.c?rev=44798&r1=44797&r2=44798&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/struct.c (original)
+++ cfe/trunk/test/CodeGen/struct.c Mon Dec 10 12:25:34 2007
@@ -90,3 +90,16 @@
}
+/* _Bool types */
+
+struct _w
+{
+ short a,b;
+ short c,d;
+ short e,f;
+ short g;
+
+ unsigned int h,i;
+
+ _Bool j,k;
+} ws;
More information about the cfe-commits
mailing list