summaryrefslogtreecommitdiff
path: root/tools/llvm-dis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 09:29:57 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 09:29:57 +0000
commit44dadffe4bd58ab32961ca5fe537e8ba69c09243 (patch)
tree745eccd4ec6ba93e89d8c2d992db470dbd025134 /tools/llvm-dis
parent4bcca0f2ac85c918fc8617e34b7642e5e5233460 (diff)
switch tools to bitcode instead of bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dis')
-rw-r--r--tools/llvm-dis/Makefile2
-rw-r--r--tools/llvm-dis/llvm-dis.cpp28
2 files changed, 9 insertions, 21 deletions
diff --git a/tools/llvm-dis/Makefile b/tools/llvm-dis/Makefile
index 4b1088aec9..8e9501d38d 100644
--- a/tools/llvm-dis/Makefile
+++ b/tools/llvm-dis/Makefile
@@ -9,7 +9,7 @@
LEVEL = ../..
TOOLNAME = llvm-dis
-LINK_COMPONENTS := bcreader bitreader
+LINK_COMPONENTS := bitreader
REQUIRES_EH := 1
include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index 12a53285c0..6321551446 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -19,9 +19,7 @@
#include "llvm/Module.h"
#include "llvm/PassManager.h"
#include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/Bytecode/Reader.h"
#include "llvm/Assembly/PrintModulePass.h"
-#include "llvm/Support/Compressor.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
@@ -45,9 +43,6 @@ Force("f", cl::desc("Overwrite output files"));
static cl::opt<bool>
DontPrint("disable-output", cl::desc("Don't output the .ll file"), cl::Hidden);
-static cl::opt<bool>
-Bitcode("bitcode", cl::desc("Read a bitcode file"));
-
int main(int argc, char **argv) {
llvm_shutdown_obj X; // Call llvm_shutdown() on exit.
try {
@@ -59,21 +54,14 @@ int main(int argc, char **argv) {
std::auto_ptr<Module> M;
- if (Bitcode) {
- MemoryBuffer *Buffer
- = MemoryBuffer::getFileOrSTDIN(&InputFilename[0], InputFilename.size());
-
- if (Buffer == 0)
- ErrorMessage = "Error reading file '" + InputFilename + "'";
- else
- M.reset(ParseBitcodeFile(Buffer, &ErrorMessage));
-
- delete Buffer;
- } else {
- M.reset(ParseBytecodeFile(InputFilename,
- Compressor::decompressToNewBuffer,
- &ErrorMessage));
- }
+ MemoryBuffer *Buffer
+ = MemoryBuffer::getFileOrSTDIN(&InputFilename[0], InputFilename.size());
+
+ if (Buffer == 0)
+ ErrorMessage = "Error reading file '" + InputFilename + "'";
+ else
+ M.reset(ParseBitcodeFile(Buffer, &ErrorMessage));
+ delete Buffer;
if (M.get() == 0) {
cerr << argv[0] << ": ";