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
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index aefd1ea..2276e16 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -244,8 +244,8 @@
     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 @@
       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 @@
     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 @@
         << "\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 @@
       
     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 @@
     }
     
     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 @@
     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.