aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-01-31 01:36:53 +0000
committerAnders Carlsson <andersca@mac.com>2010-01-31 01:36:53 +0000
commitbb7e17b52ffaa4097b4c4d7935746d23539ffe2a (patch)
treeff8d4abfc14ace938cbba36b4c7de52ebbb57670 /lib/CodeGen/CGExprAgg.cpp
parent8958dc9bf38ddaa820425cf3a2fec346d3820f28 (diff)
Some class related cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 2cbaa1153c..bc8a45b2fa 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -252,8 +252,8 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
if (E->getCastKind() == CastExpr::CK_DerivedToBaseMemberPointer)
std::swap(DerivedDecl, BaseDecl);
- llvm::Constant *Adj = CGF.CGM.GetCXXBaseClassOffset(DerivedDecl, BaseDecl);
- if (Adj) {
+ if (llvm::Constant *Adj =
+ CGF.CGM.GetNonVirtualBaseClassOffset(DerivedDecl, BaseDecl)) {
if (E->getCastKind() == CastExpr::CK_DerivedToBaseMemberPointer)
SrcAdj = Builder.CreateSub(SrcAdj, Adj, "adj");
else