diff options
author | John McCall <rjmccall@apple.com> | 2011-04-12 00:42:48 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-04-12 00:42:48 +0000 |
commit | 755d8497e39071aa24acc173ff07083e3256b8f8 (patch) | |
tree | 47914f058b5de1a56c791ed102573f17d36f1d5a /lib/CodeGen/CGExprScalar.cpp | |
parent | 235c02f79e0ece9463490aa87eaaa02bad300dac (diff) |
After some discussion with Doug, we decided that it made a lot more sense
for __unknown_anytype resolution to destructively modify the AST. So that's
what it does now, which significantly simplifies some of the implementation.
Normal member calls work pretty cleanly now, and I added support for
propagating unknown-ness through &.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129331 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index f2ab0a2e06..a44c03ec11 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1127,22 +1127,6 @@ Value *ScalarExprEmitter::EmitCastExpr(CastExpr *CE) { return RV.getScalarVal(); } - case CK_ResolveUnknownAnyType: - // Special case: resolving a member pointer constant. - if (const UnaryOperator *uo = dyn_cast<UnaryOperator>(E)) { - DeclRefExpr *declRef = cast<DeclRefExpr>(uo->getSubExpr()); - const CXXMethodDecl *method = cast<CXXMethodDecl>(declRef->getDecl()); - - const MemberPointerType *mpt = CE->getType()->castAs<MemberPointerType>(); - QualType resolvedType = mpt->getPointeeType(); - - return CGF.CGM.getCXXABI().EmitMemberPointer(method, resolvedType); - } - // fallthrough - - case CK_ResolveUnknownAnyTypeToReference: - return EmitLoadOfLValue(CE); - case CK_LValueToRValue: assert(CGF.getContext().hasSameUnqualifiedType(E->getType(), DestTy)); assert(E->isGLValue() && "lvalue-to-rvalue applied to r-value!"); |