summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
index 8cd57614305..95d363e4ecc 100644
--- a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
+++ b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
@@ -24,6 +24,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/CodeGen/DwarfWriter.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
+#include "llvm/Target/TargetRegistry.h"
using namespace llvm;
@@ -107,17 +108,6 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
return false; // we didn't modify anything.
}
-/// createPIC16CodePrinterPass - Returns a pass that prints the PIC16
-/// 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::createPIC16CodePrinterPass(formatted_raw_ostream &o,
- TargetMachine &tm,
- bool verbose) {
- return new PIC16AsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose);
-}
-
// printOperand - print operand of insn.
void PIC16AsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
@@ -435,3 +425,11 @@ void PIC16AsmPrinter::EmitRemainingAutos() {
}
}
+
+extern "C" void LLVMInitializePIC16Target() {
+ // Register the targets
+ RegisterTargetMachine<PIC16TargetMachine> A(ThePIC16Target);
+ RegisterTargetMachine<CooperTargetMachine> B(TheCooperTarget);
+ RegisterAsmPrinter<PIC16AsmPrinter> C(ThePIC16Target);
+ RegisterAsmPrinter<PIC16AsmPrinter> D(TheCooperTarget);
+}
OpenPOWER on IntegriCloud