Unconditionally #define the ARC ownership qualifiers, instead of #defining
them only on Darwin tool chains. llvm-svn: 133112
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user