aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-07 04:48:21 +0000
committerChris Lattner <sabre@nondot.org>2009-04-07 04:48:21 +0000
commit3a5cbd37c91d29bbd169ae869b234ed1fc954cb6 (patch)
tree35110c516197bd2ca1a88d9e823e7148ed7fd5d6 /lib/Lex/Preprocessor.cpp
parent90658ec72542df44eb462c69056184d2946bdbce (diff)
The __weak and __strong defines are common to all darwin targets
and are even set in C mode. As such, move them to Targets.cpp. __OBJC_GC__ is also darwin specific, but seems reasonable to always define it when in objc-gc mode. This fixes rdar://6761450 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 9eaf1403a2..139f310e7d 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -500,15 +500,9 @@ static void InitializePredefinedMacros(Preprocessor &PP,
if (PP.getLangOptions().ObjCNonFragileABI)
DefineBuiltinMacro(Buf, "__OBJC2__=1");
- if (PP.getLangOptions().getGCMode() == LangOptions::NonGC) {
- DefineBuiltinMacro(Buf, "__weak=");
- DefineBuiltinMacro(Buf, "__strong=");
- } else {
- DefineBuiltinMacro(Buf, "__weak=__attribute__((objc_gc(weak)))");
- DefineBuiltinMacro(Buf, "__strong=__attribute__((objc_gc(strong)))");
+ if (PP.getLangOptions().getGCMode() != LangOptions::NonGC)
DefineBuiltinMacro(Buf, "__OBJC_GC__=1");
- }
-
+
if (PP.getLangOptions().NeXTRuntime)
DefineBuiltinMacro(Buf, "__NEXT_RUNTIME__=1");
}