From fe71008c2764768f25478b16c1802755189ed7c9 Mon Sep 17 00:00:00 2001 From: Ken Dyck Date: Wed, 19 Jan 2011 01:58:38 +0000 Subject: 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 --- lib/CodeGen/CGExpr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExpr.cpp') 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(E) && !LV.isBitField() && LV.isSimple()) - EmitCheck(LV.getAddress(), getContext().getTypeSize(E->getType()) / 8); + EmitCheck(LV.getAddress(), + getContext().getTypeSizeInChars(E->getType()).getQuantity()); return LV; } -- cgit v1.2.3