diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2004-06-08 05:55:53 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2004-06-08 05:55:53 +0000 |
| commit | 2eb0f1d44c94caee89cffbd3043ce0e8c94d7b53 (patch) | |
| tree | 33d3d78c4dcd3a1e5778309da4e40546bdec0eb2 /llvm/include | |
| parent | 42427f0ccbc8fd8bccfd7ad32229f6adb62bd423 (diff) | |
| download | bcm5719-llvm-2eb0f1d44c94caee89cffbd3043ce0e8c94d7b53.tar.gz bcm5719-llvm-2eb0f1d44c94caee89cffbd3043ce0e8c94d7b53.zip | |
Clean up documentation and make it possible for the BytecodeAnalyzer to
store the output of the bytecode dumper.
llvm-svn: 14058
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Bytecode/Analyzer.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/llvm/include/llvm/Bytecode/Analyzer.h b/llvm/include/llvm/Bytecode/Analyzer.h index d3e1b955033..e6df72fd790 100644 --- a/llvm/include/llvm/Bytecode/Analyzer.h +++ b/llvm/include/llvm/Bytecode/Analyzer.h @@ -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 @@ struct BytecodeAnalysis { /// 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 @@ -92,6 +97,12 @@ void AnalyzeBytecodeBuffer( /// @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 #endif |

