From d0f2921c3211299a80c043a3251e6b34dddba061 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Thu, 29 Aug 2013 16:22:26 +0000 Subject: [PATCH] ObjectiveC migrator: remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189592 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/IdentifierTable.h | 1 - lib/ARCMigrate/ObjCMT.cpp | 5 ----- lib/Basic/IdentifierTable.cpp | 10 +--------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h index 4a54728dff..764ef04f54 100644 --- a/include/clang/Basic/IdentifierTable.h +++ b/include/clang/Basic/IdentifierTable.h @@ -586,7 +586,6 @@ enum ObjCInstanceTypeFamily { OIT_None, OIT_Array, OIT_Dictionary, - OIT_MemManage, OIT_Singleton }; diff --git a/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp index d71ab0d1bc..b21c75b7fe 100644 --- a/lib/ARCMigrate/ObjCMT.cpp +++ b/lib/ARCMigrate/ObjCMT.cpp @@ -700,11 +700,6 @@ void ObjCMigrateASTConsumer::migrateMethodInstanceType(ASTContext &Ctx, case OIT_Dictionary: ClassName = "NSDictionary"; break; - // For methods where Clang automatically infers instancetype from the selector - // (e.g., all -init* methods), we should not suggest "instancetype" because it - // is redundant, - case OIT_MemManage: - return; case OIT_Singleton: migrateFactoryMethod(Ctx, CDecl, OM, OIT_Singleton); return; diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index b1a22eea7e..5102f7cfd3 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -461,20 +461,12 @@ ObjCInstanceTypeFamily Selector::getInstTypeMethodFamily(Selector sel) { if (name.empty()) return OIT_None; switch (name.front()) { case 'a': - if (startsWithWord(name, "alloc")) return OIT_MemManage; - else - if (startsWithWord(name, "array")) return OIT_Array; + if (startsWithWord(name, "array")) return OIT_Array; break; case 'd': if (startsWithWord(name, "dictionary")) return OIT_Dictionary; if (startsWithWord(name, "default")) return OIT_Singleton; break; - case 'i': - if (startsWithWord(name, "init")) return OIT_MemManage; - break; - case 'r': - if (startsWithWord(name, "retain")) return OIT_MemManage; - break; case 's': if (startsWithWord(name, "shared") || startsWithWord(name, "standard")) -- 2.40.0