aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
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.