summaryrefslogtreecommitdiff
path: root/tools/llvm-dis
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-09-15 15:33:42 +0000
committerDan Gohman <gohman@apple.com>2009-09-15 15:33:42 +0000
commit04fc8c8d335af7c54d9a4fb8409748d2c84402f3 (patch)
tree246f17c27dd8883ac62062bc22dbc482b8baf2f5 /tools/llvm-dis
parenta5f4dbf111d722b4912022a5eee0306307b79fb4 (diff)
downloadllvm-04fc8c8d335af7c54d9a4fb8409748d2c84402f3.tar.gz
llvm-04fc8c8d335af7c54d9a4fb8409748d2c84402f3.tar.bz2
llvm-04fc8c8d335af7c54d9a4fb8409748d2c84402f3.tar.xz
Don't bother using a PassManager just to print a Module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dis')
-rw-r--r--tools/llvm-dis/llvm-dis.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index 43bde53599..b8b1a39384 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -18,9 +18,7 @@
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
-#include "llvm/PassManager.h"
#include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
@@ -105,11 +103,8 @@ int main(int argc, char **argv) {
}
// All that llvm-dis does is write the assembly to a file.
- if (!DontPrint) {
- PassManager Passes;
- Passes.add(createPrintModulePass(Out.get()));
- Passes.run(*M.get());
- }
+ if (!DontPrint)
+ *Out << *M;
return 0;
}