Lines Matching refs:MigrateCtx
27 MigrationContext &MigrateCtx; member in __anonc1f1c3880111::GCAttrsCollector
35 : MigrateCtx(ctx), FullyMigratable(false), in GCAttrsCollector()
92 if (MigrateCtx.AttrSet.count(OrigLoc)) in handleAttr()
95 ASTContext &Ctx = MigrateCtx.Pass.Ctx; in handleAttr()
108 MigrateCtx.AttrSet.insert(OrigLoc); in handleAttr()
109 MigrateCtx.GCAttrs.push_back(MigrationContext::GCAttrOccurrence()); in handleAttr()
110 MigrationContext::GCAttrOccurrence &Attr = MigrateCtx.GCAttrs.back(); in handleAttr()
172 SourceManager &SM = MigrateCtx.Pass.Ctx.getSourceManager(); in isInMainFile()
179 static void errorForGCAttrsOnNonObjC(MigrationContext &MigrateCtx) { in errorForGCAttrsOnNonObjC() argument
180 TransformActions &TA = MigrateCtx.Pass.TA; in errorForGCAttrsOnNonObjC()
182 for (unsigned i = 0, e = MigrateCtx.GCAttrs.size(); i != e; ++i) { in errorForGCAttrsOnNonObjC()
183 MigrationContext::GCAttrOccurrence &Attr = MigrateCtx.GCAttrs[i]; in errorForGCAttrsOnNonObjC()
195 static void checkWeakGCAttrs(MigrationContext &MigrateCtx) { in checkWeakGCAttrs() argument
196 TransformActions &TA = MigrateCtx.Pass.TA; in checkWeakGCAttrs()
198 for (unsigned i = 0, e = MigrateCtx.GCAttrs.size(); i != e; ++i) { in checkWeakGCAttrs()
199 MigrationContext::GCAttrOccurrence &Attr = MigrateCtx.GCAttrs[i]; in checkWeakGCAttrs()
204 if (!canApplyWeak(MigrateCtx.Pass.Ctx, Attr.ModifiedType, in checkWeakGCAttrs()
207 if (!MigrateCtx.RemovedAttrSet.count(Attr.Loc)) in checkWeakGCAttrs()
219 static void checkAllAtProps(MigrationContext &MigrateCtx, in checkAllAtProps() argument
259 TransformActions &TA = MigrateCtx.Pass.TA; in checkAllAtProps()
265 MigrateCtx.AtPropsWeak.insert(AtLoc); in checkAllAtProps()
270 if (canApplyWeak(MigrateCtx.Pass.Ctx, IndProps.front()->getType(), in checkAllAtProps()
277 MigrateCtx.rewritePropertyAttribute("assign", toAttr, AtLoc); in checkAllAtProps()
279 MigrateCtx.addPropertyAttribute(toAttr, AtLoc); in checkAllAtProps()
285 Loc = MigrateCtx.Pass.Ctx.getSourceManager() in checkAllAtProps()
292 MigrateCtx.RemovedAttrSet.insert(Loc); in checkAllAtProps()
296 static void checkAllProps(MigrationContext &MigrateCtx, in checkAllProps() argument
316 checkAllAtProps(MigrateCtx, AtLoc, IndProps); in checkAllProps()
320 void GCAttrsTraverser::traverseTU(MigrationContext &MigrateCtx) { in traverseTU() argument
322 GCAttrsCollector(MigrateCtx, AllProps).TraverseDecl( in traverseTU()
323 MigrateCtx.Pass.Ctx.getTranslationUnitDecl()); in traverseTU()
325 errorForGCAttrsOnNonObjC(MigrateCtx); in traverseTU()
326 checkAllProps(MigrateCtx, AllProps); in traverseTU()
327 checkWeakGCAttrs(MigrateCtx); in traverseTU()