Register Target's TargetMachine and AsmPrinter in the new registry.
 - This abuses TargetMachineRegistry's constructor for now, this will get
   cleaned up in time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75762 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
index 21622db..ea810df 100644
--- a/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
+++ b/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
@@ -24,6 +24,7 @@
 #include "llvm/CodeGen/DwarfWriter.h"
 #include "llvm/Target/TargetAsmInfo.h"
 #include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetRegistry.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/Mangler.h"
@@ -292,9 +293,6 @@
   return false;
 }
 
-// Force static initialization.
-extern "C" void LLVMInitializeAlphaAsmPrinter() { }
-
 namespace {
   static struct Register {
     Register() {
@@ -302,3 +300,10 @@
     }
   } Registrator;
 }
+
+// Force static initialization.
+extern "C" void LLVMInitializeAlphaAsmPrinter() { 
+  extern Target TheAlphaTarget;
+  TargetRegistry::RegisterAsmPrinter(TheAlphaTarget,
+                                     createAlphaCodePrinterPass);
+}