From 64eea749debc5952df9819759de3269e8d08e3b0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 26 Jul 2002 18:40:14 +0000 Subject: *** empty log message *** llvm-svn: 3105 --- llvm/lib/Bytecode/Writer/Writer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/Bytecode/Writer/Writer.cpp') diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index f7219ea08e4..4eade882758 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/lib/Bytecode/Writer/Writer.cpp @@ -25,11 +25,14 @@ #include "llvm/SymbolTable.h" #include "llvm/DerivedTypes.h" #include "Support/STLExtras.h" +#include "Support/StatisticReporter.h" #include #include static RegisterPass X("emitbytecode", "Bytecode Writer"); +static Statistic<> +BytesWritten("bytecodewriter\t- Number of bytecode bytes written"); BytecodeWriter::BytecodeWriter(std::deque &o, const Module *M) @@ -234,6 +237,9 @@ void WriteBytecodeToFile(const Module *C, std::ostream &Out) { // This object populates buffer for us... BytecodeWriter BCW(Buffer, C); + // Keep track of how much we've written... + BytesWritten += Buffer.size(); + // Okay, write the deque out to the ostream now... the deque is not // sequential in memory, however, so write out as much as possible in big // chunks, until we're done. -- cgit v1.2.3