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 ba96fad..7deea40 100644
--- a/Lex/Preprocessor.cpp
+++ b/Lex/Preprocessor.cpp
@@ -369,6 +369,13 @@
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);