[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Chris Lattner
sabre at nondot.org
Wed Feb 7 13:41:53 PST 2007
Changes in directory llvm/tools/llvm-prof:
llvm-prof.cpp updated: 1.29 -> 1.30
---
Log message:
push bytecode decompressor out through APIs. Now the bytecode reader
api's look like this:
ModuleProvider *getBytecodeModuleProvider(
const std::string &Filename, ///< Name of file to be read
BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
std::string* ErrMsg = 0, ///< Optional error message holder
BytecodeHandler* H = 0 ///< Optional handler for reader events
);
This is ugly, but allows a client to say:
getBytecodeModuleProvider("foo", 0);
If they do this, there is no dependency on the compression libraries, saving
codesize.
---
Diffs of the changes: (+3 -1)
llvm-prof.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/tools/llvm-prof/llvm-prof.cpp
diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.29 llvm/tools/llvm-prof/llvm-prof.cpp:1.30
--- llvm/tools/llvm-prof/llvm-prof.cpp:1.29 Tue Dec 5 19:18:01 2006
+++ llvm/tools/llvm-prof/llvm-prof.cpp Wed Feb 7 15:41:02 2007
@@ -115,7 +115,9 @@
// Read in the bytecode file...
std::string ErrorMessage;
- Module *M = ParseBytecodeFile(BytecodeFile, &ErrorMessage);
+ Module *M = ParseBytecodeFile(BytecodeFile,
+ Compressor::decompressToNewBuffer,
+ &ErrorMessage);
if (M == 0) {
std::cerr << argv[0] << ": " << BytecodeFile << ": "
<< ErrorMessage << "\n";
More information about the llvm-commits
mailing list