llvm.org GIT mirror llvm / 04fc8c8
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 Dan Gohman 10 years ago
1 changed file(s) with 2 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
1717
1818 #include "llvm/LLVMContext.h"
1919 #include "llvm/Module.h"
20 #include "llvm/PassManager.h"
2120 #include "llvm/Bitcode/ReaderWriter.h"
22 #include "llvm/Assembly/PrintModulePass.h"
2321 #include "llvm/Support/CommandLine.h"
2422 #include "llvm/Support/ManagedStatic.h"
2523 #include "llvm/Support/MemoryBuffer.h"
104102 }
105103
106104 // All that llvm-dis does is write the assembly to a file.
107 if (!DontPrint) {
108 PassManager Passes;
109 Passes.add(createPrintModulePass(Out.get()));
110 Passes.run(*M.get());
111 }
105 if (!DontPrint)
106 *Out << *M;
112107
113108 return 0;
114109 }