[llvm-commits] CVS: llvm/include/llvm/Bytecode/Analyzer.h
LLVM
llvm at cs.uiuc.edu
Tue Jun 8 01:01:02 PDT 2004
Changes in directory llvm/include/llvm/Bytecode:
Analyzer.h updated: 1.1 -> 1.2
---
Log message:
Clean up documentation and make it possible for the BytecodeAnalyzer to
store the output of the bytecode dumper.
---
Diffs of the changes: (+17 -6)
Index: llvm/include/llvm/Bytecode/Analyzer.h
diff -u llvm/include/llvm/Bytecode/Analyzer.h:1.1 llvm/include/llvm/Bytecode/Analyzer.h:1.2
--- llvm/include/llvm/Bytecode/Analyzer.h:1.1 Mon Jun 7 12:53:43 2004
+++ llvm/include/llvm/Bytecode/Analyzer.h Tue Jun 8 00:55:53 2004
@@ -1,4 +1,4 @@
-//===-- llvm/Bytecode/Analyzer.h - Analyzer for bytecode files --*- C++ -*-===//
+//===-- llvm/Bytecode/Analyzer.h - Analyzer for Bytecode files --*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -8,10 +8,11 @@
//===----------------------------------------------------------------------===//
//
// This functionality is implemented by the lib/Bytecode/Analysis library.
-// This library is used to read VM bytecode files from an iostream and print
-// out a diagnostic analysis of the contents of the file. It is intended for
-// three uses: (a) understanding the bytecode format, (b) ensuring correctness
-// of bytecode format, (c) statistical analysis of generated bytecode files.
+// This library is used to read VM bytecode files from a file or memory buffer
+// and print out a diagnostic analysis of the contents of the file. It is
+// intended for three uses: (a) understanding the bytecode format, (b) ensuring
+// correctness of bytecode format, (c) statistical analysis of generated
+// bytecode files.
//
//===----------------------------------------------------------------------===//
@@ -61,8 +62,12 @@
/// function.
std::map<std::string,BytecodeFunctionInfo> FunctionInfo;
+ /// The content of the bytecode dump
+ std::string BytecodeDump;
+
/// Flags for what should be done
- bool dumpBytecode;
+ bool dumpBytecode; ///< If true, BytecodeDump has contents
+ bool detailedResults; ///< If true, FunctionInfo has contents
};
/// This function is the main entry point into the bytecode analysis library. It
@@ -91,6 +96,12 @@
/// a human legible form.
/// @brief Print BytecodeAnalysis structure to an ostream
void PrintBytecodeAnalysis(BytecodeAnalysis& bca, std::ostream& Out );
+
+/// @brief std::ostream inserter for BytecodeAnalysis structure
+inline std::ostream& operator<<(std::ostream& Out, BytecodeAnalysis& bca ) {
+ PrintBytecodeAnalysis(bca,Out);
+ return Out;
+}
} // End llvm namespace
More information about the llvm-commits
mailing list