Change how we create the cwriter, and add a buttload of libraries that it now
needs.  This will be fixed shortly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11407 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-dis/Makefile b/tools/llvm-dis/Makefile
index d5d0f93..aac499c 100644
--- a/tools/llvm-dis/Makefile
+++ b/tools/llvm-dis/Makefile
@@ -9,5 +9,5 @@
 LEVEL = ../..
 
 TOOLNAME = llvm-dis
-USEDLIBS = bcreader cwriter ipa.a vmcore support.a
+USEDLIBS = cwriter ipa.a scalaropts.a target.a transformutils analysis.a bcreader vmcore support.a
 include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index d035b7f..225787b 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -122,7 +122,7 @@
     Passes.add(new PrintModulePass(Out));
     break;
   case c:              // Convert LLVM to C
-    Passes.add(createWriteToCPass(*Out));
+    AddPassesToWriteC(Passes, *Out);
     break;
   }