diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-07 04:48:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-07 04:48:21 +0000 |
commit | c2d140156c577111393bd243dadac6a19257cc0e (patch) | |
tree | 49eb76aa6ab35648cdd8ca8df80822b1e1145341 /clang/lib/Lex/Preprocessor.cpp | |
parent | 89be6526c3a75f608d2c00c18bde8413547aa509 (diff) | |
download | bcm5719-llvm-c2d140156c577111393bd243dadac6a19257cc0e.tar.gz bcm5719-llvm-c2d140156c577111393bd243dadac6a19257cc0e.zip |
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
llvm-svn: 68494
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 9eaf1403a2d..139f310e7d1 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/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"); } |