diff options
author | Anders Carlsson <andersca@mac.com> | 2010-10-31 23:22:37 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-10-31 23:22:37 +0000 |
commit | a14f5979572aa25c03d24750ee4724d2031d4ede (patch) | |
tree | a24291cdc168fe0d2763d3b70568796c1b96ce98 /lib/CodeGen/CGExprScalar.cpp | |
parent | a2311513524ecef954d2b438bfbe09aa9511b660 (diff) |
Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index f45cd164d4..39f25f916b 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1407,7 +1407,7 @@ Value *ScalarExprEmitter::VisitOffsetOfExpr(OffsetOfExpr *E) { // Compute the offset to the base. const RecordType *BaseRT = CurrentType->getAs<RecordType>(); CXXRecordDecl *BaseRD = cast<CXXRecordDecl>(BaseRT->getDecl()); - int64_t OffsetInt = RL.getBaseClassOffset(BaseRD) / + int64_t OffsetInt = RL.getBaseClassOffsetInBits(BaseRD) / CGF.getContext().getCharWidth(); Offset = llvm::ConstantInt::get(ResultType, OffsetInt); break; |