Wrap const MDNode * inside DIDescriptor.
[oota-llvm.git] / tools / llvm-dis / llvm-dis.cpp
index 43bde53599cb77764213a0578626e1ea885fe74d..b8b1a39384cd766dcd7057130e07ce6d48cd5abe 100644 (file)
@@ -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;
 }