Privatize PrintModulePass and PrintFunctionPass and add
createPrintModulePass and createPrintFunctionPass.
 - So clients who compile w/o RTTI can use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57933 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index 9802541..276b1e4 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -118,7 +118,7 @@
     if (!DontPrint) {
       PassManager Passes;
       OStream L(*Out);
-      Passes.add(new PrintModulePass(&L));
+      Passes.add(createPrintModulePass(&L));
       Passes.run(*M.get());
     }
 
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index ea6ed33..358cbda 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -543,7 +543,7 @@
       }
       
       if (PrintEachXForm)
-        Passes.add(new PrintModulePass(&cerr));
+        Passes.add(createPrintModulePass(&cerr));
     }
     
     // If -std-compile-opts was specified at the end of the pass list, add them.