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 | b0fcc59e19508dca2dc809fb5c83e19c4d3e9ffc (patch) | |
tree | 50f55aa851f434ae67dabbb02ed0ac6c21b5f2fe /clang/lib/CodeGen/CGExprConstant.cpp | |
parent | a759d72d7b00328077328306dae142c9c97a57e2 (diff) | |
download | bcm5719-llvm-b0fcc59e19508dca2dc809fb5c83e19c4d3e9ffc.tar.gz bcm5719-llvm-b0fcc59e19508dca2dc809fb5c83e19c4d3e9ffc.zip |
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.
llvm-svn: 125332
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index dc84b367cf0..c569b37b946 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/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!"); |