]> granicus.if.org Git - clang/commitdiff
Adjust for the API change to APInt::getBitsSet.
authorDan Gohman <gohman@apple.com>
Tue, 12 Feb 2008 21:49:34 +0000 (21:49 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 12 Feb 2008 21:49:34 +0000 (21:49 +0000)
People more familiar with clang than me, please review this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47033 91177308-0d34-0410-b5e6-96231b3b80d8

CodeGen/CGExpr.cpp

index 6baf17fb10501186c7c311223126d5697165f1d3..64f2697e4df55f9b08332126e70e1e2278d9c503 100644 (file)
@@ -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");