summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-02-16 18:28:48 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-02-16 18:28:48 +0000
commiteb209e7dbd2596d528f7a9b2777ea2e43e7ce7da (patch)
treed66305c05b8c03f70869f058dc8ee1f6104d68eb /clang/lib/Lex/Preprocessor.cpp
parentbcbf86399f16fcf02b278cf43a1aa83b522a9de3 (diff)
downloadbcm5719-llvm-eb209e7dbd2596d528f7a9b2777ea2e43e7ce7da.tar.gz
bcm5719-llvm-eb209e7dbd2596d528f7a9b2777ea2e43e7ce7da.zip
define __OBJC2__ for objc's nonfragile abi.
llvm-svn: 64642
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 772427b6ae5..f50004c666b 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -476,6 +476,8 @@ static void InitializePredefinedMacros(Preprocessor &PP,
DefineBuiltinMacro(Buf, "__STDC_HOSTED__=1");
if (PP.getLangOptions().ObjC1) {
DefineBuiltinMacro(Buf, "__OBJC__=1");
+ if (PP.getLangOptions().ObjCNonFragileABI)
+ DefineBuiltinMacro(Buf, "__OBJC2__=1");
if (PP.getLangOptions().getGCMode() == LangOptions::NonGC) {
DefineBuiltinMacro(Buf, "__weak=");
OpenPOWER on IntegriCloud