summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-02-11 01:54:29 +0000
committerKen Dyck <kd@kendyck.com>2011-02-11 01:54:29 +0000
commitb0fcc59e19508dca2dc809fb5c83e19c4d3e9ffc (patch)
tree50f55aa851f434ae67dabbb02ed0ac6c21b5f2fe /clang/lib/CodeGen/CGExprConstant.cpp
parenta759d72d7b00328077328306dae142c9c97a57e2 (diff)
downloadbcm5719-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.cpp3
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!");
OpenPOWER on IntegriCloud