aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer/Writer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-26 18:40:14 +0000
committerChris Lattner <sabre@nondot.org>2002-07-26 18:40:14 +0000
commitce6ef112c4abb1f7fd64738c5760f48cddc9a4a5 (patch)
treed20df3512eb0212eaff8ebb8b0c077209944b242 /lib/Bytecode/Writer/Writer.cpp
parent0cbc6c2fd8470c62d824667fc600d80a494d26cd (diff)
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/Writer.cpp')
-rw-r--r--lib/Bytecode/Writer/Writer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index f7219ea08e..4eade88275 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/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 <string.h>
#include <algorithm>
static RegisterPass<WriteBytecodePass> X("emitbytecode", "Bytecode Writer");
+static Statistic<>
+BytesWritten("bytecodewriter\t- Number of bytecode bytes written");
BytecodeWriter::BytecodeWriter(std::deque<unsigned char> &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.