From fd88a6160d482256d824bd5e093917c76900259c Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 31 Oct 2010 23:22:37 +0000 Subject: Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881 --- clang/lib/CodeGen/CGExprScalar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExprScalar.cpp') diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index f45cd164d43..39f25f916b8 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -1407,7 +1407,7 @@ 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.getBaseClassOffset(BaseRD) / + int64_t OffsetInt = RL.getBaseClassOffsetInBits(BaseRD) / CGF.getContext().getCharWidth(); Offset = llvm::ConstantInt::get(ResultType, OffsetInt); break; -- cgit v1.2.1