]> granicus.if.org Git - clang/commitdiff
avoid std::string yet again.
authorChris Lattner <sabre@nondot.org>
Tue, 24 Jul 2007 06:59:01 +0000 (06:59 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 24 Jul 2007 06:59:01 +0000 (06:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40462 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/PrintPreprocessedOutput.cpp

index a8bc4e40d222dde426682a55f6bd8116b6dd918a..3eb11b719cf89dc8bd0256158cffe951727ba421 100644 (file)
@@ -250,8 +250,10 @@ void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc,
   
   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());