diff --git a/include/clang/AST/OperationKinds.h b/include/clang/AST/OperationKinds.h index 469da99a8cbf60d5c32f6289e8d718be173a169f..87ba113b39d84b2548625a894f4b487b2ab963e7 100644 --- a/include/clang/AST/OperationKinds.h +++ b/include/clang/AST/OperationKinds.h @@ -52,13 +52,6 @@ enum CastKind { /// conversion is always unqualified. CK_LValueToRValue, - /// CK_GetObjCProperty - A conversion which calls an Objective-C - /// property getter. The operand is an OK_ObjCProperty l-value; the - /// result will generally be an r-value, but could be an ordinary - /// gl-value if the property reference is to an implicit property - /// for a method that returns a reference type. - CK_GetObjCProperty, - /// CK_NoOp - A conversion which does not affect the type other than /// (possibly) adding qualifiers. /// int -> int diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 6eb6116b01b6d75b7c0d37518141f8ab224ead2a..848e07974445e927cad1568fa7c1ef0a21c07066 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -1084,7 +1084,6 @@ void CastExpr::CheckCastConsistency() const { case CK_Dependent: case CK_LValueToRValue: - case CK_GetObjCProperty: case CK_NoOp: case CK_PointerToBoolean: case CK_IntegralToBoolean: @@ -1110,8 +1109,6 @@ const char *CastExpr::getCastKindName() const { return "LValueBitCast"; case CK_LValueToRValue: return "LValueToRValue"; - case CK_GetObjCProperty: - return "GetObjCProperty"; case CK_NoOp: return "NoOp"; case CK_BaseToDerived: diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 8ec16217a707850993f241c35ae77311ba2ecfa1..a9408f6384c379a5f83e33fa3578ebf8446c5c5b 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -2526,7 +2526,6 @@ bool IntExprEvaluator::VisitCastExpr(const CastExpr *E) { case CK_BitCast: case CK_Dependent: - case CK_GetObjCProperty: case CK_LValueBitCast: case CK_UserDefinedConversion: case CK_ARCProduceObject: @@ -2987,7 +2986,6 @@ bool ComplexExprEvaluator::VisitCastExpr(const CastExpr *E) { return ExprEvaluatorBaseTy::VisitCastExpr(E); case CK_Dependent: - case CK_GetObjCProperty: case CK_LValueBitCast: case CK_UserDefinedConversion: return false; diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index deea60cae0b6e7b90ec4adfadcdf03ca73a35d63..d7e3168a3a8f532676522f4f7359c46e71d461bf 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -2010,8 +2010,6 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { case CK_Dependent: llvm_unreachable("dependent cast kind in IR gen!"); - case CK_GetObjCProperty: llvm_unreachable("GetObjCProperty"); - case CK_NoOp: case CK_LValueToRValue: if (!E->getSubExpr()->Classify(getContext()).isPRValue() diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp index cbb5dfee0dbbf554e9f3376da8c184403b32fd2a..0fda6659635b11b0f02a15e30a78c778be8b5422 100644 --- a/lib/CodeGen/CGExprAgg.cpp +++ b/lib/CodeGen/CGExprAgg.cpp @@ -333,8 +333,6 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) { "should have been unpacked before we got here"); } - case CK_GetObjCProperty: llvm_unreachable("GetObjCProperty!"); - case CK_LValueToRValue: // hope for downstream optimization case CK_NoOp: case CK_UserDefinedConversion: diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index 5cc30fe3c1820bc2492189132d8dbd13514414e6..e62f9a620ea324459ef3cd6295e00387b25591fe 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -355,7 +355,6 @@ ComplexPairTy ComplexExprEmitter::EmitCast(CastExpr::CastKind CK, Expr *Op, QualType DestTy) { switch (CK) { case CK_Dependent: llvm_unreachable("dependent cast kind in IR gen!"); - case CK_GetObjCProperty: llvm_unreachable("GetObjCProperty!"); case CK_NoOp: case CK_LValueToRValue: diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 889cdd8f09131130d9c7d4aadcde066855bfe0be..7a1cbdeb1eb4918c916b04632433a8f5794ed843 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -581,7 +581,6 @@ public: // These will never be supported. case CK_ObjCObjectLValueCast: - case CK_GetObjCProperty: case CK_ToVoid: case CK_Dynamic: case CK_ARCProduceObject: diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index b888138dda5e86bd380cda84af9273e4573c5002..dfdf7b864087da50247f31295027c619c779024e 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1046,7 +1046,6 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { // are in the same order as in the CastKind enum. switch (Kind) { case CK_Dependent: llvm_unreachable("dependent cast kind in IR gen!"); - case CK_GetObjCProperty: llvm_unreachable("GetObjCProperty!"); case CK_LValueBitCast: case CK_ObjCObjectLValueCast: { diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 6b40b40cad8a19fd5d5f10123d4f68386295cec2..88d19a3b6c956fcf1f3d828d27255a7404f26cb9 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -1087,22 +1087,6 @@ QualType CodeGenFunction::TypeOfSelfObject() { return PTy->getPointeeType(); } -static RValue GenerateMessageSendSuper(CodeGenFunction &CGF, - ReturnValueSlot Return, - QualType ResultType, - Selector S, - llvm::Value *Receiver, - const CallArgList &CallArgs) { - const ObjCMethodDecl *OMD = cast<ObjCMethodDecl>(CGF.CurFuncDecl); - bool isClassMessage = OMD->isClassMethod(); - bool isCategoryImpl = isa<ObjCCategoryImplDecl>(OMD->getDeclContext()); - return CGF.CGM.getObjCRuntime() - .GenerateMessageSendSuper(CGF, Return, ResultType, - S, OMD->getClassInterface(), - isCategoryImpl, Receiver, - isClassMessage, CallArgs); -} - void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ llvm::Constant *EnumerationMutationFn = CGM.getObjCRuntime().EnumerationMutationFunction(); diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 8a3324230d08ec3534a635921bccd04ea43cf177..50bc5755dde806d25b18ba760f46193eb0d87be6 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -4158,22 +4158,6 @@ static bool findRetainCycleOwner(Expr *e, RetainCycleOwner &owner) { e = cast->getSubExpr(); continue; - case CK_GetObjCProperty: { - // Bail out if this isn't a strong explicit property. - const ObjCPropertyRefExpr *pre = cast->getSubExpr()->getObjCProperty(); - if (pre->isImplicitProperty()) return false; - ObjCPropertyDecl *property = pre->getExplicitProperty(); - if (!property->isRetaining() && - !(property->getPropertyIvarDecl() && - property->getPropertyIvarDecl()->getType() - .getObjCLifetime() == Qualifiers::OCL_Strong)) - return false; - - owner.Indirect = true; - e = const_cast<Expr*>(pre->getBase()); - continue; - } - default: return false; } diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index f1cb5ea0408fac13f2469fd4a029fb8fed738282..72494009658ac3cc01307ad81da3d887d3eca467 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -4080,11 +4080,6 @@ ExprResult Sema::MaybeBindToTemporary(Expr *E) { ObjCMethodDecl *D = 0; if (ObjCMessageExpr *Send = dyn_cast<ObjCMessageExpr>(E)) { D = Send->getMethodDecl(); - } else { - CastExpr *CE = cast<CastExpr>(E); - assert(CE->getCastKind() == CK_GetObjCProperty); - const ObjCPropertyRefExpr *PRE = CE->getSubExpr()->getObjCProperty(); - D = (PRE->isImplicitProperty() ? PRE->getImplicitPropertyGetter() : 0); } ReturnsRetained = (D && D->hasAttr<NSReturnsRetainedAttr>()); diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index a9179dcf7fdbe31e2dae1b3ba65d0943d4ffae73..54a3af52ecad6a5d3613142d7299083760665cdf 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -1696,7 +1696,6 @@ namespace { case CK_NoOp: case CK_LValueToRValue: case CK_BitCast: - case CK_GetObjCProperty: case CK_CPointerToObjCPointerCast: case CK_BlockPointerToObjCPointerCast: case CK_AnyPointerToBlockPointerCast: diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp index 86570cb5d759ee8599ec36f7d1d9081c0085c6c4..b82dfea58defd040a0289ff109cb058dc96d464e 100644 --- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngineC.cpp @@ -179,8 +179,7 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, ExplodedNodeSet dstPreStmt; getCheckerManager().runCheckersForPreStmt(dstPreStmt, Pred, CastE, *this); - if (CastE->getCastKind() == CK_LValueToRValue || - CastE->getCastKind() == CK_GetObjCProperty) { + if (CastE->getCastKind() == CK_LValueToRValue) { for (ExplodedNodeSet::iterator I = dstPreStmt.begin(), E = dstPreStmt.end(); I!=E; ++I) { ExplodedNode *subExprNode = *I; @@ -206,8 +205,6 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, switch (CastE->getCastKind()) { case CK_LValueToRValue: llvm_unreachable("LValueToRValue casts handled earlier."); - case CK_GetObjCProperty: - llvm_unreachable("GetObjCProperty casts handled earlier."); case CK_ToVoid: continue; // The analyzer doesn't do anything special with these casts,