summaryrefslogtreecommitdiff
path: root/tools/llvm-dis/llvm-dis.cpp
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/llvm-dis.cpp
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/llvm-dis.cpp')
-rw-r--r--tools/llvm-dis/llvm-dis.cpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index 12a53285c0a..6321551446a 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] << ": ";