aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@gmail.com>2008-01-22 19:15:30 +0000
committerLauro Ramos Venancio <lauro.venancio@gmail.com>2008-01-22 19:15:30 +0000
commit9e18d3ed84a95be2bc42f1ce65d3bab2ee8a1e27 (patch)
tree22da60f4333d9df92ad35fc7e71a56836f07ac34 /CodeGen/CodeGenTypes.cpp
parentc62f4890ecc3c6b59b2c037f9b45c42c210ae77f (diff)
Fix two bugs in bitfield codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenTypes.cpp')
-rw-r--r--CodeGen/CodeGenTypes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/CodeGen/CodeGenTypes.cpp b/CodeGen/CodeGenTypes.cpp
index 583537db9b..4cced51e25 100644
--- a/CodeGen/CodeGenTypes.cpp
+++ b/CodeGen/CodeGenTypes.cpp
@@ -578,8 +578,8 @@ void RecordOrganizer::placeBitField(const FieldDecl *FD) {
// This is : struct { char a; int CurrentField:10;};
// where 'CurrentField' shares first field with 'a'.
addPaddingFields(Cursor + BitFieldSize);
- CGT.addFieldInfo(FD, i);
- CGT.addBitFieldInfo(FD, Cursor, BitFieldSize);
+ CGT.addFieldInfo(FD, i - 1);
+ CGT.addBitFieldInfo(FD, Cursor - O, BitFieldSize);
Cursor += BitFieldSize;
} else {
// Place the bitfield in a new LLVM field.