Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.

rdar://9477613.

llvm-svn: 133779
This commit is contained in:
Argyrios Kyrtzidis
2011-06-24 00:08:59 +00:00
parent 4d1f660ace
commit cff00d9c12
32 changed files with 147 additions and 147 deletions

View File

@@ -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.