[cfe-commits] r42819 - /cfe/trunk/Lex/Preprocessor.cpp

Chris Lattner sabre at nondot.org
Tue Oct 9 15:58:09 PDT 2007


Author: lattner
Date: Tue Oct  9 17:58:09 2007
New Revision: 42819

URL: http://llvm.org/viewvc/llvm-project?rev=42819&view=rev
Log:
Add a dummy for the id typedef.  Steve, plz fill this in. :)

Modified:
    cfe/trunk/Lex/Preprocessor.cpp

Modified: cfe/trunk/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Lex/Preprocessor.cpp?rev=42819&r1=42818&r2=42819&view=diff

==============================================================================
--- cfe/trunk/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/Lex/Preprocessor.cpp Tue Oct  9 17:58:09 2007
@@ -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);





More information about the cfe-commits mailing list