Unconditionally #define the ARC ownership qualifiers, instead of #defining

them only on Darwin tool chains.

llvm-svn: 133112
This commit is contained in:
John McCall
2011-06-16 00:03:19 +00:00
parent 8b098b0d57
commit 5d36a8cc70
2 changed files with 10 additions and 8 deletions

View File

@@ -606,6 +606,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
if (LangOpts.FastRelaxedMath)
Builder.defineMacro("__FAST_RELAXED_MATH__");
if (LangOpts.ObjCAutoRefCount) {
Builder.defineMacro("__weak", "__attribute__((objc_lifetime(weak)))");
Builder.defineMacro("__strong", "__attribute__((objc_lifetime(strong)))");
Builder.defineMacro("__autoreleasing",
"__attribute__((objc_lifetime(autoreleasing)))");
Builder.defineMacro("__unsafe_unretained",
"__attribute__((objc_lifetime(none)))");
}
// Get other target #defines.
TI.getTargetDefines(LangOpts, Builder);
}