summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
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
commitcff00d9c127c7c1c25cf2d5345d5008460f235a1 (patch)
treec290e899ae8586acf5204519a940c8ae776c82ff /clang/lib/Frontend
parent4d1f660aced0b9660e65928c87b1a6ddf591f2cb (diff)
downloadbcm5719-llvm-cff00d9c127c7c1c25cf2d5345d5008460f235a1.tar.gz
bcm5719-llvm-cff00d9c127c7c1c25cf2d5345d5008460f235a1.zip
Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.
rdar://9477613. llvm-svn: 133779
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index aefd1ea5b88..2276e16eb7c 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud