summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index a285d7533a9..29740fdf8f8 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -301,15 +301,14 @@ RValue CodeGenFunction::EmitObjCPropertyGet(const Expr *Exp) {
EmitScalarExpr(E->getBase()),
false, CallArgList());
}
- else if (const ObjCKVCRefExpr *E = dyn_cast<ObjCKVCRefExpr>(Exp)) {
+ else {
+ const ObjCKVCRefExpr *E = cast<ObjCKVCRefExpr>(Exp);
Selector S = E->getGetterMethod()->getSelector();
return CGM.getObjCRuntime().
GenerateMessageSend(*this, Exp->getType(), S,
EmitScalarExpr(E->getBase()),
false, CallArgList());
}
- else
- assert (0 && "bad expression node in EmitObjCPropertyGet");
}
void CodeGenFunction::EmitObjCPropertySet(const Expr *Exp,
OpenPOWER on IntegriCloud