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/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index cffbecd..3d6fb80 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -1304,19 +1304,8 @@
return AsmPrinter::doFinalization(M);
}
-/// createARMCodePrinterPass - Returns a pass that prints the ARM
-/// 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::createARMCodePrinterPass(formatted_raw_ostream &o,
- TargetMachine &tm,
- bool verbose) {
- return new ARMAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose);
-}
-
// Force static initialization.
extern "C" void LLVMInitializeARMAsmPrinter() {
- TargetRegistry::RegisterAsmPrinter(TheARMTarget, createARMCodePrinterPass);
- TargetRegistry::RegisterAsmPrinter(TheThumbTarget, createARMCodePrinterPass);
+ RegisterAsmPrinter<ARMAsmPrinter> X(TheARMTarget);
+ RegisterAsmPrinter<ARMAsmPrinter> Y(TheThumbTarget);
}