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 | fd88a6160d482256d824bd5e093917c76900259c (patch) | |
tree | e04fd6920c88fe19c94462e29d343bd27e81e8bb /clang/lib/CodeGen/CGExprScalar.cpp | |
parent | baa5126dbcacd3292b7547e44724fb1a92270f2b (diff) | |
download | bcm5719-llvm-fd88a6160d482256d824bd5e093917c76900259c.tar.gz bcm5719-llvm-fd88a6160d482256d824bd5e093917c76900259c.zip |
Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.
llvm-svn: 117881
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<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; |