aboutsummaryrefslogtreecommitdiff
path: root/Driver/HTMLPrint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Driver/HTMLPrint.cpp')
-rw-r--r--Driver/HTMLPrint.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Driver/HTMLPrint.cpp b/Driver/HTMLPrint.cpp
index 981be851cf..165689d143 100644
--- a/Driver/HTMLPrint.cpp
+++ b/Driver/HTMLPrint.cpp
@@ -56,8 +56,10 @@ HTMLPrinter::~HTMLPrinter() {
// Emit the HTML.
if (const RewriteBuffer *RewriteBuf = R.getRewriteBufferFor(FileID)) {
- std::string S(RewriteBuf->begin(), RewriteBuf->end());
- printf("%s\n", S.c_str());
+ char *Buffer = (char*)malloc(RewriteBuf->size());
+ std::copy(RewriteBuf->begin(), RewriteBuf->end(), Buffer);
+ fwrite(Buffer, 1, RewriteBuf->size(), stdout);
+ free(Buffer);
}
}