]> granicus.if.org Git - clang/commitdiff
Add a dummy for the id typedef. Steve, plz fill this in. :)
authorChris Lattner <sabre@nondot.org>
Tue, 9 Oct 2007 22:58:09 +0000 (22:58 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 9 Oct 2007 22:58:09 +0000 (22:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42819 91177308-0d34-0410-b5e6-96231b3b80d8

Lex/Preprocessor.cpp

index ba96fad92cf41c200844452a68d6ebb8f9a35b32..7deea405485fde518a3126117d535feaa8a15a9b 100644 (file)
@@ -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);