diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-06-29 23:17:34 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-06-29 23:17:34 +0000 |
commit | 39e6af456be41c881a85e5b36e48011ca337820f (patch) | |
tree | f92724862859ed440a5b939e0a2c546d414a1919 /include/llvm/Bytecode/Analyzer.h | |
parent | c1f901c58936e71ce6b3021137dca7023318505a (diff) |
Adjust comments to match code.
Allow analysis to return the module created by the bcreader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bytecode/Analyzer.h')
-rw-r--r-- | include/llvm/Bytecode/Analyzer.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/include/llvm/Bytecode/Analyzer.h b/include/llvm/Bytecode/Analyzer.h index 18c566516b..6ce3a394cc 100644 --- a/include/llvm/Bytecode/Analyzer.h +++ b/include/llvm/Bytecode/Analyzer.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// // -// This functionality is implemented by the lib/Bytecode/Analysis library. -// This library is used to read VM bytecode files from a file or memory buffer +// This functionality is implemented by the lib/Bytecode/Reader library. +// It 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 @@ -25,7 +25,9 @@ namespace llvm { +// Forward declarations class Function; +class Module; /// This structure is used to contain the output of the Bytecode Analysis /// library. It simply contains fields to hold each item of the analysis @@ -91,16 +93,20 @@ struct BytecodeAnalysis { /// The content of the bytecode dump std::string BytecodeDump; + /// The content of the progressive verification + std::string VerifyInfo; + /// Flags for what should be done - bool dumpBytecode; ///< If true, BytecodeDump has contents - bool detailedResults; ///< If true, FunctionInfo has contents + bool dumpBytecode; ///< If true, BytecodeDump has contents + bool detailedResults; ///< If true, FunctionInfo has contents + bool progressiveVerify; ///< If true, VerifyInfo has contents }; /// This function is the main entry point into the bytecode analysis library. It /// allows you to simply provide a \p filename and storage for the \p Results /// that will be filled in with the analysis results. /// @brief Analyze contents of a bytecode File -void AnalyzeBytecodeFile( +Module* AnalyzeBytecodeFile( const std::string& Filename, ///< The name of the bytecode file to read BytecodeAnalysis& Results, ///< The results of the analysis std::string* ErrorStr = 0 ///< Errors, if any. @@ -111,9 +117,10 @@ void AnalyzeBytecodeFile( /// assumed to contain a complete bytecode file. The \p Buffer is analyzed and /// the \p Results are filled in. /// @brief Analyze contents of a bytecode buffer. -void AnalyzeBytecodeBuffer( +Module* AnalyzeBytecodeBuffer( const unsigned char* Buffer, ///< Pointer to start of bytecode buffer unsigned BufferSize, ///< Size of the bytecode buffer + const std::string& ModuleID, ///< Identifier for the module BytecodeAnalysis& Results, ///< The results of the analysis std::string* ErrorStr = 0 ///< Errors, if any. ); |