diff options
author | John McCall <rjmccall@apple.com> | 2010-03-30 23:58:03 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-03-30 23:58:03 +0000 |
commit | 23cba801e11b03929c44f8cf54578305963a3476 (patch) | |
tree | 7a1edfa728d0b5e9f0a9732d0faaec43ad2aa242 /lib/CodeGen/CGExpr.cpp | |
parent | 658f679b63cf92204d707c5dfc1251ae8f3c0762 (diff) |
Introduce a new kind of derived-to-base cast which bypasses the need for
null checks, and make sure we elide null checks when accessing base class
members.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 2ddc08a4c4..027264f25b 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1637,6 +1637,7 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { case CastExpr::CK_AnyPointerToObjCPointerCast: return EmitLValue(E->getSubExpr()); + case CastExpr::CK_UncheckedDerivedToBase: case CastExpr::CK_DerivedToBase: { const RecordType *DerivedClassTy = E->getSubExpr()->getType()->getAs<RecordType>(); |