aboutsummaryrefslogtreecommitdiff
path: root/Driver/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-24 06:59:01 +0000
committerChris Lattner <sabre@nondot.org>2007-07-24 06:59:01 +0000
commit5143196b9062128ca6028a8663fb98fdf75ce1b9 (patch)
tree7182bb4ad83139175cedfe62c672f2b28585ec6b /Driver/PrintPreprocessedOutput.cpp
parentd8e3083840fef752d11ca183f42786470ed061e3 (diff)
avoid std::string yet again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/PrintPreprocessedOutput.cpp')
-rw-r--r--Driver/PrintPreprocessedOutput.cpp6
1 files changed, 4 insertions, 2 deletions
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());