From d4f5198ae07d9a4958d8191bac694ded12173ad9 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 4 Jul 2012 18:45:14 +0000 Subject: Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159719 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 1c1075cdca..1cccafe0d7 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1555,9 +1555,8 @@ Value *ScalarExprEmitter::VisitOffsetOfExpr(OffsetOfExpr *E) { // Compute the offset to the base. const RecordType *BaseRT = CurrentType->getAs(); CXXRecordDecl *BaseRD = cast(BaseRT->getDecl()); - int64_t OffsetInt = RL.getBaseClassOffsetInBits(BaseRD) / - CGF.getContext().getCharWidth(); - Offset = llvm::ConstantInt::get(ResultType, OffsetInt); + CharUnits OffsetInt = RL.getBaseClassOffset(BaseRD); + Offset = llvm::ConstantInt::get(ResultType, OffsetInt.getQuantity()); break; } } -- cgit v1.2.3