aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-06-24 00:08:59 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-06-24 00:08:59 +0000
commitb8b0313e84700b5c6d597b3be4de41c97b7550f1 (patch)
treeb72d09eb3de6cb951acc9770ef623c9836bdf143 /lib/Frontend/InitPreprocessor.cpp
parenta81397323cc8475ef8243f938118a9c231fb18ff (diff)
Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.
rdar://9477613. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--lib/Frontend/InitPreprocessor.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index aefd1ea5b8..2276e16eb7 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -244,8 +244,8 @@ static void AddObjCXXARCLibcxxDefines(const LangOptions &LangOpts,
Out << "template <class _Tp>\n"
<< "inline __attribute__ ((__visibility__(\"hidden\"), "
<< "__always_inline__))\n"
- << "__attribute__((objc_lifetime(strong))) _Tp*\n"
- << "addressof(__attribute__((objc_lifetime(strong))) _Tp& __x) {\n"
+ << "__attribute__((objc_ownership(strong))) _Tp*\n"
+ << "addressof(__attribute__((objc_ownership(strong))) _Tp& __x) {\n"
<< " return &__x;\n"
<< "}\n"
<< "\n";
@@ -254,8 +254,8 @@ static void AddObjCXXARCLibcxxDefines(const LangOptions &LangOpts,
Out << "template <class _Tp>\n"
<< "inline __attribute__ ((__visibility__(\"hidden\"),"
<< "__always_inline__))\n"
- << "__attribute__((objc_lifetime(weak))) _Tp*\n"
- << "addressof(__attribute__((objc_lifetime(weak))) _Tp& __x) {\n"
+ << "__attribute__((objc_ownership(weak))) _Tp*\n"
+ << "addressof(__attribute__((objc_ownership(weak))) _Tp& __x) {\n"
<< " return &__x;\n"
<< "};\n"
<< "\n";
@@ -264,8 +264,8 @@ static void AddObjCXXARCLibcxxDefines(const LangOptions &LangOpts,
Out << "template <class _Tp>\n"
<< "inline __attribute__ ((__visibility__(\"hidden\"),"
<< "__always_inline__))\n"
- << "__attribute__((objc_lifetime(autoreleasing))) _Tp*\n"
- << "addressof(__attribute__((objc_lifetime(autoreleasing))) _Tp& __x) "
+ << "__attribute__((objc_ownership(autoreleasing))) _Tp*\n"
+ << "addressof(__attribute__((objc_ownership(autoreleasing))) _Tp& __x) "
<< "{\n"
<< " return &__x;\n"
<< "}\n"
@@ -312,7 +312,7 @@ static void AddObjCXXARCLibstdcxxDefines(const LangOptions &LangOpts,
<< "\n";
Out << "template<typename _Tp>\n"
- << "struct __is_scalar<__attribute__((objc_lifetime(strong))) _Tp> {\n"
+ << "struct __is_scalar<__attribute__((objc_ownership(strong))) _Tp> {\n"
<< " enum { __value = 0 };\n"
<< " typedef __false_type __type;\n"
<< "};\n"
@@ -320,7 +320,7 @@ static void AddObjCXXARCLibstdcxxDefines(const LangOptions &LangOpts,
if (!LangOpts.ObjCNoAutoRefCountRuntime) {
Out << "template<typename _Tp>\n"
- << "struct __is_scalar<__attribute__((objc_lifetime(weak))) _Tp> {\n"
+ << "struct __is_scalar<__attribute__((objc_ownership(weak))) _Tp> {\n"
<< " enum { __value = 0 };\n"
<< " typedef __false_type __type;\n"
<< "};\n"
@@ -328,7 +328,7 @@ static void AddObjCXXARCLibstdcxxDefines(const LangOptions &LangOpts,
}
Out << "template<typename _Tp>\n"
- << "struct __is_scalar<__attribute__((objc_lifetime(autoreleasing)))"
+ << "struct __is_scalar<__attribute__((objc_ownership(autoreleasing)))"
<< " _Tp> {\n"
<< " enum { __value = 0 };\n"
<< " typedef __false_type __type;\n"
@@ -614,12 +614,12 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
Builder.defineMacro("__FAST_RELAXED_MATH__");
if (LangOpts.ObjCAutoRefCount) {
- Builder.defineMacro("__weak", "__attribute__((objc_lifetime(weak)))");
- Builder.defineMacro("__strong", "__attribute__((objc_lifetime(strong)))");
+ Builder.defineMacro("__weak", "__attribute__((objc_ownership(weak)))");
+ Builder.defineMacro("__strong", "__attribute__((objc_ownership(strong)))");
Builder.defineMacro("__autoreleasing",
- "__attribute__((objc_lifetime(autoreleasing)))");
+ "__attribute__((objc_ownership(autoreleasing)))");
Builder.defineMacro("__unsafe_unretained",
- "__attribute__((objc_lifetime(none)))");
+ "__attribute__((objc_ownership(none)))");
}
// Get other target #defines.