]> granicus.if.org Git - clang/commitdiff
define __OBJC2__ for objc's nonfragile abi.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 16 Feb 2009 18:28:48 +0000 (18:28 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 16 Feb 2009 18:28:48 +0000 (18:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64642 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index 772427b6ae55490b99bdbfeefdba93074c61e4d1..f50004c666b0a1fbe7c2d25a825bc0c561dd9f79 100644 (file)
@@ -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=");