From: Chris Lattner Date: Tue, 9 Oct 2007 22:58:09 +0000 (+0000) Subject: Add a dummy for the id typedef. Steve, plz fill this in. :) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1af947276efe378dbf1f6b0ec24cb46802a124a;p=clang Add a dummy for the id typedef. Steve, plz fill this in. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42819 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Lex/Preprocessor.cpp b/Lex/Preprocessor.cpp index ba96fad92c..7deea40548 100644 --- a/Lex/Preprocessor.cpp +++ b/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);