git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
John McCall 2011-11-07 05:09:54 +00:00
Родитель 9a17a680c7
Коммит 7864435ef2
13 изменённых файлов: 1 добавлений и 61 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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:

Просмотреть файл

@ -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;

Просмотреть файл

@ -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()

Просмотреть файл

@ -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:

Просмотреть файл

@ -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:

Просмотреть файл

@ -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:

Просмотреть файл

@ -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: {

Просмотреть файл

@ -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();

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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>());

Просмотреть файл

@ -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:

Просмотреть файл

@ -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,