[cfe-commits] r40462 - /cfe/trunk/Driver/PrintPreprocessedOutput.cpp

Chris Lattner sabre at nondot.org
Mon Jul 23 23:59:01 PDT 2007


Author: lattner
Date: Tue Jul 24 01:59:01 2007
New Revision: 40462

URL: http://llvm.org/viewvc/llvm-project?rev=40462&view=rev
Log:
avoid std::string yet again.

Modified:
    cfe/trunk/Driver/PrintPreprocessedOutput.cpp

Modified: cfe/trunk/Driver/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/PrintPreprocessedOutput.cpp?rev=40462&r1=40461&r2=40462&view=diff

==============================================================================
--- cfe/trunk/Driver/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/Driver/PrintPreprocessedOutput.cpp Tue Jul 24 01:59:01 2007
@@ -250,8 +250,10 @@
   
   OutputChar('#');
   OutputChar(' ');
-  std::string Num = llvm::utostr_32(CurLine);
-  OutputString(&Num[0], Num.size());
+  
+  char NumberBuffer[20];
+  const char *NumStr = UToStr(CurLine, NumberBuffer+20);
+  OutputString(NumStr, (NumberBuffer+20)-NumStr-1);
   OutputChar(' ');
   OutputChar('"');
   OutputString(&CurFilename[0], CurFilename.size());





More information about the cfe-commits mailing list