diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-17 22:09:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-17 22:09:58 +0000 |
commit | d8df5b65fc76c2f59148e1551f56a8ee26c9607b (patch) | |
tree | defcc946a48109a7e2926561f7153b3210cc34f6 /lib/CodeGen/CGExprConstant.cpp | |
parent | 63ba0460da07749607a33ee419b315712a323542 (diff) |
improve support for big endian targets, fixing PR8171, patch
by Heikki Kultala!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 1f222a2bd1..40d7b6c32e 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -231,7 +231,7 @@ void ConstStructBuilder::AppendBitField(const FieldDecl *Field, if (CGM.getTargetData().isBigEndian()) { // We want the high bits. - Tmp = FieldValue.lshr(Tmp.getBitWidth() - 8).trunc(8); + Tmp = FieldValue.lshr(FieldValue.getBitWidth() - 8).trunc(8); } else { // We want the low bits. Tmp = FieldValue.trunc(8); |