From 06f486ecd05bd6788da97c39164c1903a084c26d Mon Sep 17 00:00:00 2001 From: Ken Dyck Date: Tue, 18 Jan 2011 02:01:14 +0000 Subject: Replace calls to CharUnits::fromQuantity() with ones to ASTContext::toCharUnitsFromBits() when converting from bit sizes to char units. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123720 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index ed3a117ef7..42d5e7923f 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1086,8 +1086,8 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { } CharUnits CodeGenModule::GetTargetTypeStoreSize(const llvm::Type *Ty) const { - return CharUnits::fromQuantity( - TheTargetData.getTypeStoreSizeInBits(Ty) / Context.getCharWidth()); + return Context.toCharUnitsFromBits( + TheTargetData.getTypeStoreSizeInBits(Ty)); } void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { -- cgit v1.2.3-70-g09d2