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/AST/ExprConstant.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/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index d23eac24d4..ced3839812 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -594,7 +594,7 @@ bool PointerExprEvaluator::VisitCastExpr(CastExpr* E) { const CXXRecordDecl *BaseDecl = Base->getType()->getAsCXXRecordDecl(); const ASTRecordLayout &Layout = Info.Ctx.getASTRecordLayout(DerivedDecl); - Offset += Layout.getBaseClassOffset(BaseDecl); + Offset += Layout.getBaseClassOffsetInBits(BaseDecl); DerivedDecl = BaseDecl; } @@ -1621,7 +1621,7 @@ bool IntExprEvaluator::VisitOffsetOfExpr(const OffsetOfExpr *E) { // Add the offset to the base. Result += CharUnits::fromQuantity( - RL.getBaseClassOffset(cast<CXXRecordDecl>(BaseRT->getDecl())) + RL.getBaseClassOffsetInBits(cast<CXXRecordDecl>(BaseRT->getDecl())) / Info.Ctx.getCharWidth()); break; } |