[llvm-commits] CVS: llvm/tools/llc/llc.cpp
Chris Lattner
sabre at nondot.org
Wed Feb 7 13:41:53 PST 2007
Changes in directory llvm/tools/llc:
llc.cpp updated: 1.142 -> 1.143
---
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)
llc.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/tools/llc/llc.cpp
diff -u llvm/tools/llc/llc.cpp:1.142 llvm/tools/llc/llc.cpp:1.143
--- llvm/tools/llc/llc.cpp:1.142 Tue Jan 30 14:08:38 2007
+++ llvm/tools/llc/llc.cpp Wed Feb 7 15:41:02 2007
@@ -24,6 +24,7 @@
#include "llvm/PassManager.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compressor.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PluginLoader.h"
#include "llvm/Support/FileUtilities.h"
@@ -175,7 +176,8 @@
sys::PrintStackTraceOnErrorSignal();
// Load the module to be compiled...
- std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename));
+ std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename,
+ Compressor::decompressToNewBuffer));
if (M.get() == 0) {
std::cerr << argv[0] << ": bytecode didn't read correctly.\n";
return 1;
More information about the llvm-commits
mailing list