Remove a few mutating ObjCCategoryDecl methods.
Remove
-setClassInterface
-setNextClassCategory
-insertNextClassCategory
and combine them in the Create function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138817 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp
index b6e3e62..7174dbe 100644
--- a/lib/AST/ASTImporter.cpp
+++ b/lib/AST/ASTImporter.cpp
@@ -2986,15 +2986,12 @@
Importer.Import(D->getAtLoc()),
Loc,
Importer.Import(D->getCategoryNameLoc()),
- Name.getAsIdentifierInfo());
+ Name.getAsIdentifierInfo(),
+ ToInterface);
ToCategory->setLexicalDeclContext(LexicalDC);
LexicalDC->addDecl(ToCategory);
Importer.Imported(D, ToCategory);
- // Link this category into its class's category list.
- ToCategory->setClassInterface(ToInterface);
- ToCategory->insertNextClassCategory();
-
// Import protocols
SmallVector<ObjCProtocolDecl *, 4> Protocols;
SmallVector<SourceLocation, 4> ProtocolLocs;