[cfe-commits] r62706 - /cfe/trunk/Driver/RewriteObjC.cpp

Steve Naroff snaroff at apple.com
Wed Jan 21 11:24:01 PST 2009


Author: snaroff
Date: Wed Jan 21 13:24:01 2009
New Revision: 62706

URL: http://llvm.org/viewvc/llvm-project?rev=62706&view=rev
Log:
Add #line to make the Visual Studio compiler happy.
Fixes <rdar://problem/6507668> clang ObjC rewriter: put #line statement at top of rewritten file

Modified:
    cfe/trunk/Driver/RewriteObjC.cpp

Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=62706&r1=62705&r2=62706&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Wed Jan 21 13:24:01 2009
@@ -456,10 +456,11 @@
      
   Rewrite.setSourceMgr(Context->getSourceManager());
   
+  Preamble = "#line 2\n";
   // declaring objc_selector outside the parameter list removes a silly
   // scope related warning...
   if (IsHeader)
-    Preamble = "#pragma once\n";
+    Preamble += "#pragma once\n";
   Preamble += "struct objc_selector; struct objc_class;\n";
   Preamble += "struct __rw_objc_super { struct objc_object *object; ";
   Preamble += "struct objc_object *superClass; ";





More information about the cfe-commits mailing list