mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-13 08:56:04 +00:00
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
This commit is contained in:
parent
c1f901c589
commit
39e6af456b
@ -7,8 +7,8 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// This functionality is implemented by the lib/Bytecode/Analysis library.
|
// This functionality is implemented by the lib/Bytecode/Reader library.
|
||||||
// This library is used to read VM bytecode files from a file or memory buffer
|
// 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
|
// 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
|
// intended for three uses: (a) understanding the bytecode format, (b) ensuring
|
||||||
// correctness of bytecode format, (c) statistical analysis of generated
|
// correctness of bytecode format, (c) statistical analysis of generated
|
||||||
@ -25,7 +25,9 @@
|
|||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
// Forward declarations
|
||||||
class Function;
|
class Function;
|
||||||
|
class Module;
|
||||||
|
|
||||||
/// This structure is used to contain the output of the Bytecode Analysis
|
/// This structure is used to contain the output of the Bytecode Analysis
|
||||||
/// library. It simply contains fields to hold each item of the 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
|
/// The content of the bytecode dump
|
||||||
std::string BytecodeDump;
|
std::string BytecodeDump;
|
||||||
|
|
||||||
|
/// The content of the progressive verification
|
||||||
|
std::string VerifyInfo;
|
||||||
|
|
||||||
/// Flags for what should be done
|
/// Flags for what should be done
|
||||||
bool dumpBytecode; ///< If true, BytecodeDump has contents
|
bool dumpBytecode; ///< If true, BytecodeDump has contents
|
||||||
bool detailedResults; ///< If true, FunctionInfo 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
|
/// 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
|
/// allows you to simply provide a \p filename and storage for the \p Results
|
||||||
/// that will be filled in with the analysis results.
|
/// that will be filled in with the analysis results.
|
||||||
/// @brief Analyze contents of a bytecode File
|
/// @brief Analyze contents of a bytecode File
|
||||||
void AnalyzeBytecodeFile(
|
Module* AnalyzeBytecodeFile(
|
||||||
const std::string& Filename, ///< The name of the bytecode file to read
|
const std::string& Filename, ///< The name of the bytecode file to read
|
||||||
BytecodeAnalysis& Results, ///< The results of the analysis
|
BytecodeAnalysis& Results, ///< The results of the analysis
|
||||||
std::string* ErrorStr = 0 ///< Errors, if any.
|
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
|
/// assumed to contain a complete bytecode file. The \p Buffer is analyzed and
|
||||||
/// the \p Results are filled in.
|
/// the \p Results are filled in.
|
||||||
/// @brief Analyze contents of a bytecode buffer.
|
/// @brief Analyze contents of a bytecode buffer.
|
||||||
void AnalyzeBytecodeBuffer(
|
Module* AnalyzeBytecodeBuffer(
|
||||||
const unsigned char* Buffer, ///< Pointer to start of bytecode buffer
|
const unsigned char* Buffer, ///< Pointer to start of bytecode buffer
|
||||||
unsigned BufferSize, ///< Size of the bytecode buffer
|
unsigned BufferSize, ///< Size of the bytecode buffer
|
||||||
|
const std::string& ModuleID, ///< Identifier for the module
|
||||||
BytecodeAnalysis& Results, ///< The results of the analysis
|
BytecodeAnalysis& Results, ///< The results of the analysis
|
||||||
std::string* ErrorStr = 0 ///< Errors, if any.
|
std::string* ErrorStr = 0 ///< Errors, if any.
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user