diff options
author | Ken Dyck <kd@kendyck.com> | 2011-02-11 01:54:29 +0000 |
---|---|---|
committer | Ken Dyck <kd@kendyck.com> | 2011-02-11 01:54:29 +0000 |
commit | dd76a9ab9ea675671200f94b18ce95766841952b (patch) | |
tree | 12945459f4e5250a0888bb4956ebb68cc66c70be /lib/CodeGen/CGExprConstant.cpp | |
parent | 0e376a0ca8372c9e809d08a9db2fae98394878b8 (diff) |
Add a helper function, ASTContext::toBits(), that converts sizes in
CharUnits to sizes in bits, and use it to tidy up the places where the
conversion was done explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index dc84b367cf..c569b37b94 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -394,8 +394,7 @@ bool ConstStructBuilder::Build(InitListExpr *ILE) { } // Append tail padding if necessary. - AppendTailPadding( - Layout.getSize().getQuantity() * CGM.getContext().getCharWidth()); + AppendTailPadding(CGM.getContext().toBits(Layout.getSize())); assert(Layout.getSize().getQuantity() == NextFieldOffsetInBytes && "Tail padding mismatch!"); |