aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/CodeGen/CGExpr.cpp b/CodeGen/CGExpr.cpp
index 6baf17fb10..64f2697e4d 100644
--- a/CodeGen/CGExpr.cpp
+++ b/CodeGen/CGExpr.cpp
@@ -285,7 +285,7 @@ void CodeGenFunction::EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst,
llvm::Constant *Mask = llvm::ConstantInt::get(
llvm::APInt::getBitsSet(EltTySize, StartBit,
- StartBit + BitfieldSize - 1));
+ StartBit + BitfieldSize));
// Mask out any bits that shouldn't be set in the result.
NewVal = Builder.CreateAnd(NewVal, Mask, "tmp");