summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-01-19 01:58:38 +0000
committerKen Dyck <kd@kendyck.com>2011-01-19 01:58:38 +0000
commitfe71008c2764768f25478b16c1802755189ed7c9 (patch)
tree54b4b86c30e456a0ab8bf588a28d762dee47ea6f /lib/CodeGen/CGExpr.cpp
parent69fc1b330090853ced40436805258fc9a0a70bdc (diff)
downloadclang-fe71008c2764768f25478b16c1802755189ed7c9.tar.gz
clang-fe71008c2764768f25478b16c1802755189ed7c9.tar.bz2
clang-fe71008c2764768f25478b16c1802755189ed7c9.tar.xz
Replace calls to getTypeSize() and getTypeAlign() with their 'InChars'
counterparts where char units are needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index e6af820d77..bdc4ef723a 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -475,7 +475,8 @@ LValue CodeGenFunction::EmitUnsupportedLValue(const Expr *E,
LValue CodeGenFunction::EmitCheckedLValue(const Expr *E) {
LValue LV = EmitLValue(E);
if (!isa<DeclRefExpr>(E) && !LV.isBitField() && LV.isSimple())
- EmitCheck(LV.getAddress(), getContext().getTypeSize(E->getType()) / 8);
+ EmitCheck(LV.getAddress(),
+ getContext().getTypeSizeInChars(E->getType()).getQuantity());
return LV;
}