summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-07-04 18:45:14 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-07-04 18:45:14 +0000
commit2ef3031496d7d3380ce2152011f2e244293f83d9 (patch)
tree395795e73a2ff01c5ea182d7ef0d901aabd374c3 /clang/lib/CodeGen/CGExprScalar.cpp
parent1ea8e092beadfefdd885d8355c7b66fd1d8bfe40 (diff)
downloadbcm5719-llvm-2ef3031496d7d3380ce2152011f2e244293f83d9.tar.gz
bcm5719-llvm-2ef3031496d7d3380ce2152011f2e244293f83d9.zip
Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.
No functionality change. llvm-svn: 159719
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 1c1075cdcae..1cccafe0d78 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -1555,9 +1555,8 @@ 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.getBaseClassOffsetInBits(BaseRD) /
- CGF.getContext().getCharWidth();
- Offset = llvm::ConstantInt::get(ResultType, OffsetInt);
+ CharUnits OffsetInt = RL.getBaseClassOffset(BaseRD);
+ Offset = llvm::ConstantInt::get(ResultType, OffsetInt.getQuantity());
break;
}
}
OpenPOWER on IntegriCloud