summaryrefslogtreecommitdiffstats
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
commit5d451781795992175093b074bef1239bc8161011 (patch)
tree98c293bf8cd05d0db446cf9357d3224375bcc525
parent1f1b0dbc28b565daadce7927e3f1178c9a0a6888 (diff)
downloadbcm5719-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.cpp7
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);
OpenPOWER on IntegriCloud