Add new helpers for registering targets.
- Less boilerplate == good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77052 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
index ae449be..572326e 100644
--- a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
+++ b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
@@ -78,17 +78,6 @@
#include "SystemZGenAsmWriter.inc"
-/// createSystemZCodePrinterPass - Returns a pass that prints the SystemZ
-/// assembly code for a MachineFunction to the given output stream,
-/// using the given target machine description. This should work
-/// regardless of whether the function is in SSA form.
-///
-FunctionPass *llvm::createSystemZCodePrinterPass(formatted_raw_ostream &o,
- TargetMachine &tm,
- bool verbose) {
- return new SystemZAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose);
-}
-
void SystemZAsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
unsigned FnAlign = MF.getAlignment();
const Function *F = MF.getFunction();
@@ -403,6 +392,5 @@
// Force static initialization.
extern "C" void LLVMInitializeSystemZAsmPrinter() {
- TargetRegistry::RegisterAsmPrinter(TheSystemZTarget,
- createSystemZCodePrinterPass);
+ RegisterAsmPrinter<SystemZAsmPrinter> X(TheSystemZTarget);
}