[cfe-commits] r90688 - /cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp

Steve Naroff snaroff at apple.com
Sat Dec 5 17:02:14 PST 2009


Author: snaroff
Date: Sat Dec  5 19:02:14 2009
New Revision: 90688

URL: http://llvm.org/viewvc/llvm-project?rev=90688&view=rev
Log:
Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=71473


Modified:
    cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp

Modified: cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp?rev=90688&r1=90687&r2=90688&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/lib/Frontend/PrintPreprocessedOutput.cpp Sat Dec  5 19:02:14 2009
@@ -141,17 +141,23 @@
     EmittedMacroOnThisLine = false;
   }
 
-  OS << '#' << ' ' << LineNo << ' ' << '"';
+  OS << '#';
+  if (PP.getLangOptions().Microsoft)
+    OS << "line";
+  OS << ' ' << LineNo << ' ' << '"';
+  
   OS.write(&CurFilename[0], CurFilename.size());
   OS << '"';
 
-  if (ExtraLen)
-    OS.write(Extra, ExtraLen);
-
-  if (FileType == SrcMgr::C_System)
-    OS.write(" 3", 2);
-  else if (FileType == SrcMgr::C_ExternCSystem)
-    OS.write(" 3 4", 4);
+  if (!PP.getLangOptions().Microsoft) {
+    if (ExtraLen)
+      OS.write(Extra, ExtraLen);
+
+    if (FileType == SrcMgr::C_System)
+      OS.write(" 3", 2);
+    else if (FileType == SrcMgr::C_ExternCSystem)
+      OS.write(" 3 4", 4);
+  }
   OS << '\n';
 }
 





More information about the cfe-commits mailing list