From 744879ea01779a48f898a801c847677b0bfa824a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 6 May 2007 09:32:02 +0000 Subject: switch tools to bitcode from bytecode git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36872 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lli/Makefile | 2 +- tools/lli/lli.cpp | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) (limited to 'tools/lli') diff --git a/tools/lli/Makefile b/tools/lli/Makefile index f5383d3b51..d443b159b6 100644 --- a/tools/lli/Makefile +++ b/tools/lli/Makefile @@ -9,7 +9,7 @@ LEVEL := ../.. TOOLNAME := lli -LINK_COMPONENTS := jit interpreter native bcreader bitreader selectiondag +LINK_COMPONENTS := jit interpreter native bitreader selectiondag # Enable JIT support include $(LEVEL)/Makefile.common diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index e3809538a5..a1caf1172d 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -17,13 +17,11 @@ #include "llvm/ModuleProvider.h" #include "llvm/Type.h" #include "llvm/Bitcode/ReaderWriter.h" -#include "llvm/Bytecode/Reader.h" #include "llvm/CodeGen/LinkAllCodegenComponents.h" #include "llvm/ExecutionEngine/JIT.h" #include "llvm/ExecutionEngine/Interpreter.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Compressor.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/PluginLoader.h" @@ -34,8 +32,6 @@ using namespace llvm; namespace { - cl::opt Bitcode("bitcode"); - cl::opt InputFile(cl::desc(""), cl::Positional, cl::init("-")); @@ -81,19 +77,13 @@ int main(int argc, char **argv, char * const *envp) { // Load the bytecode... std::string ErrorMsg; ModuleProvider *MP = 0; - if (Bitcode) { - MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(&InputFile[0], - InputFile.size()); - if (Buffer == 0) - ErrorMsg = "Error reading file '" + InputFile + "'"; - else { - MP = getBitcodeModuleProvider(Buffer, &ErrorMsg); - if (!MP) delete Buffer; - } - } else { - MP = getBytecodeModuleProvider(InputFile, - Compressor::decompressToNewBuffer, - &ErrorMsg); + MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(&InputFile[0], + InputFile.size()); + if (Buffer == 0) + ErrorMsg = "Error reading file '" + InputFile + "'"; + else { + MP = getBitcodeModuleProvider(Buffer, &ErrorMsg); + if (!MP) delete Buffer; } if (!MP) { -- cgit v1.2.3