diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-10-09 22:58:09 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-10-09 22:58:09 +0000 |
| commit | 5d451781795992175093b074bef1239bc8161011 (patch) | |
| tree | 98c293bf8cd05d0db446cf9357d3224375bcc525 | |
| parent | 1f1b0dbc28b565daadce7927e3f1178c9a0a6888 (diff) | |
| download | bcm5719-llvm-5d451781795992175093b074bef1239bc8161011.tar.gz bcm5719-llvm-5d451781795992175093b074bef1239bc8161011.zip | |
Add a dummy for the id typedef. Steve, plz fill this in. :)
llvm-svn: 42819
| -rw-r--r-- | clang/Lex/Preprocessor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/Lex/Preprocessor.cpp b/clang/Lex/Preprocessor.cpp index ba96fad92cf..7deea405485 100644 --- a/clang/Lex/Preprocessor.cpp +++ b/clang/Lex/Preprocessor.cpp @@ -369,6 +369,13 @@ static void InitializePredefinedMacros(Preprocessor &PP, DefineBuiltinMacro(Buf, "__OBJC__=1"); if (PP.getLangOptions().ObjC2) DefineBuiltinMacro(Buf, "__OBJC2__=1"); + + if (PP.getLangOptions().ObjC1) { + // FIXME: make this the right thing. + const char *IDTypedef = "/*typedef int id;*/\n"; + Buf.insert(Buf.end(), IDTypedef, IDTypedef+strlen(IDTypedef)); + } + // Get the target #defines. PP.getTargetInfo().getTargetDefines(Buf); |

