Provide a new kind of iterator, the specific_decl_iterator, that
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index 62aed79..7ca972c 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -879,7 +879,7 @@
// Unique method name
std::string NameStr;
- if (OMD->isInstance())
+ if (OMD->isInstanceMethod())
NameStr += "_I_";
else
NameStr += "_C_";
@@ -909,7 +909,7 @@
ResultStr += "(";
// invisible arguments
- if (OMD->isInstance()) {
+ if (OMD->isInstanceMethod()) {
QualType selfTy = Context->getObjCInterfaceType(OMD->getClassInterface());
selfTy = Context->getPointerType(selfTy);
if (!LangOpts.Microsoft) {
@@ -2148,7 +2148,7 @@
ObjCInterfaceDecl *RewriteObjC::isSuperReceiver(Expr *recExpr) {
// check if we are sending a message to 'super'
- if (!CurMethodDef || !CurMethodDef->isInstance()) return 0;
+ if (!CurMethodDef || !CurMethodDef->isInstanceMethod()) return 0;
if (ObjCSuperExpr *Super = dyn_cast<ObjCSuperExpr>(recExpr)) {
const PointerType *PT = Super->getType()->getAsPointerType();