From 28ea04fc4caa40a04220c61bbcadd9d692aa0c7f Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 10 Nov 2015 23:00:25 +0000 Subject: Define __unsafe_unretained and __autoreleasing in ObjC GC mode. This was an accidental regression from the MRC __weak patch. llvm-svn: 252668 --- clang/lib/Frontend/InitPreprocessor.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Frontend') diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index c82e8974185..30bf118bc29 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -867,6 +867,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, LangOpts.getGC() != LangOptions::NonGC) { Builder.defineMacro("__weak", "__attribute__((objc_gc(weak)))"); Builder.defineMacro("__strong", "__attribute__((objc_gc(strong)))"); + Builder.defineMacro("__autoreleasing", ""); + Builder.defineMacro("__unsafe_unretained", ""); } else if (LangOpts.ObjC1) { Builder.defineMacro("__weak", "__attribute__((objc_ownership(weak)))"); Builder.defineMacro("__strong", "__attribute__((objc_ownership(strong)))"); -- cgit v1.2.3