diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-04-19 05:17:33 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-04-19 05:17:33 +0000 |
commit | 73daaa8fb25385d4b664a3e174985b08b4b3db59 (patch) | |
tree | 28702340f48f937ab308bb89639ff448a60e688f /clang/lib/CodeGen/CGExprConstant.cpp | |
parent | 636a332906b6b773935de7c3774c8b7389473d82 (diff) | |
download | bcm5719-llvm-73daaa8fb25385d4b664a3e174985b08b4b3db59.tar.gz bcm5719-llvm-73daaa8fb25385d4b664a3e174985b08b4b3db59.zip |
[CodeGen] Use APInt::lshrInPlace instead of APInt::lshr. NFC
llvm-svn: 300658
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 3db15c646f4..53c18413070 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -201,7 +201,7 @@ void ConstStructBuilder::AppendBitField(const FieldDecl *Field, unsigned NewFieldWidth = FieldSize - BitsInPreviousByte; if (CGM.getDataLayout().isBigEndian()) { - Tmp = Tmp.lshr(NewFieldWidth); + Tmp.lshrInPlace(NewFieldWidth); Tmp = Tmp.trunc(BitsInPreviousByte); // We want the remaining high bits. @@ -210,7 +210,7 @@ void ConstStructBuilder::AppendBitField(const FieldDecl *Field, Tmp = Tmp.trunc(BitsInPreviousByte); // We want the remaining low bits. - FieldValue = FieldValue.lshr(BitsInPreviousByte); + FieldValue.lshrInPlace(BitsInPreviousByte); FieldValue = FieldValue.trunc(NewFieldWidth); } } @@ -273,7 +273,7 @@ void ConstStructBuilder::AppendBitField(const FieldDecl *Field, // We want the low bits. Tmp = FieldValue.trunc(CharWidth); - FieldValue = FieldValue.lshr(CharWidth); + FieldValue.lshrInPlace(CharWidth); } Elements.push_back(llvm::ConstantInt::get(CGM.getLLVMContext(), Tmp)); |