diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-20 19:15:02 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-20 19:15:02 +0000 |
commit | 86f960143c73f573919255c4465de71f85793c2e (patch) | |
tree | 71376c28974caf6d6208f05bd3ce326b8b6de1ca /lib/ARCMigrate/TransProperties.cpp | |
parent | afb51afd986384d88161ff0f8a4731847236126a (diff) |
arc migrator: replace "retain" attribute with "strong"
which have same semantics in mrr as well as arr.
// rdar://10688312
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate/TransProperties.cpp')
-rw-r--r-- | lib/ARCMigrate/TransProperties.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/ARCMigrate/TransProperties.cpp b/lib/ARCMigrate/TransProperties.cpp index f8bc8a3c5f..b36acbb205 100644 --- a/lib/ARCMigrate/TransProperties.cpp +++ b/lib/ARCMigrate/TransProperties.cpp @@ -50,7 +50,7 @@ class PropertiesRewriter { enum PropActionKind { PropAction_None, - PropAction_RetainRemoved, + PropAction_RetainReplacedWithStrong, PropAction_AssignRemoved, PropAction_AssignRewritten, PropAction_MaybeAddWeakOrUnsafe @@ -161,9 +161,11 @@ private: switch (kind) { case PropAction_None: return; - case PropAction_RetainRemoved: - removeAttribute("retain", atLoc); + case PropAction_RetainReplacedWithStrong: { + StringRef toAttr = "strong"; + MigrateCtx.rewritePropertyAttribute("retain", toAttr, atLoc); return; + } case PropAction_AssignRemoved: return removeAssignForDefaultStrong(props, atLoc); case PropAction_AssignRewritten: @@ -193,7 +195,7 @@ private: if (propAttrs & ObjCPropertyDecl::OBJC_PR_retain) { // strong is the default. - return doPropAction(PropAction_RetainRemoved, props, atLoc); + return doPropAction(PropAction_RetainReplacedWithStrong, props, atLoc); } bool HasIvarAssignedAPlusOneObject = hasIvarAssignedAPlusOneObject(props); |