aboutsummaryrefslogtreecommitdiff
path: root/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-09 22:58:09 +0000
committerChris Lattner <sabre@nondot.org>2007-10-09 22:58:09 +0000
commitf1af947276efe378dbf1f6b0ec24cb46802a124a (patch)
tree1e81b982a9dae94c15beb1638e686380c9836aa3 /Lex/Preprocessor.cpp
parent53b0dabbe52219a8057659b90539837394ef0fa1 (diff)
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
Diffstat (limited to 'Lex/Preprocessor.cpp')
-rw-r--r--Lex/Preprocessor.cpp7
1 files changed, 7 insertions, 0 deletions
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);