[llvm-commits] [llvm] r81858 - /llvm/trunk/tools/llvm-dis/llvm-dis.cpp

Dan Gohman gohman at apple.com
Tue Sep 15 08:33:42 PDT 2009


Author: djg
Date: Tue Sep 15 10:33:42 2009
New Revision: 81858

URL: http://llvm.org/viewvc/llvm-project?rev=81858&view=rev
Log:
Don't bother using a PassManager just to print a Module.

Modified:
    llvm/trunk/tools/llvm-dis/llvm-dis.cpp

Modified: llvm/trunk/tools/llvm-dis/llvm-dis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dis/llvm-dis.cpp?rev=81858&r1=81857&r2=81858&view=diff

==============================================================================
--- llvm/trunk/tools/llvm-dis/llvm-dis.cpp (original)
+++ llvm/trunk/tools/llvm-dis/llvm-dis.cpp Tue Sep 15 10:33:42 2009
@@ -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 @@
   }
 
   // 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;
 }





More information about the llvm-commits mailing list