diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-02-16 18:28:48 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-02-16 18:28:48 +0000 |
commit | 2639e4f88482a5ab41f65918d71453acb9d3d45d (patch) | |
tree | 7fa895c2f27c0d3e126bd34566f06881a6a35c2a /lib/Lex/Preprocessor.cpp | |
parent | 6871981fbccba9e8a63997d58245ec0add114f49 (diff) |
define __OBJC2__ for objc's nonfragile abi.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 772427b6ae..f50004c666 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/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="); |