From: Chris Lattner Date: Tue, 24 Jul 2007 06:59:01 +0000 (+0000) Subject: avoid std::string yet again. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5143196b9062128ca6028a8663fb98fdf75ce1b9;p=clang avoid std::string yet again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40462 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/PrintPreprocessedOutput.cpp b/Driver/PrintPreprocessedOutput.cpp index a8bc4e40d2..3eb11b719c 100644 --- a/Driver/PrintPreprocessedOutput.cpp +++ b/Driver/PrintPreprocessedOutput.cpp @@ -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());