diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:12 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:12 +0000 |
| commit | b2f21fb044b6b5c52cff6227f9f79ca4ed42b18f (patch) | |
| tree | 86c1bc482baa6c81fc70b8d715153bfa93377186 /lib/Target/Mips/MipsTargetMachine.h | |
| parent | 600c6fa13de5c407dc36dbb0ab73807868741ae0 (diff) | |
Notes
Diffstat (limited to 'lib/Target/Mips/MipsTargetMachine.h')
| -rw-r--r-- | lib/Target/Mips/MipsTargetMachine.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsTargetMachine.h b/lib/Target/Mips/MipsTargetMachine.h index a9e1df27ae7fe..85fafadde7c4b 100644 --- a/lib/Target/Mips/MipsTargetMachine.h +++ b/lib/Target/Mips/MipsTargetMachine.h @@ -33,10 +33,23 @@ namespace llvm { protected: virtual const TargetAsmInfo *createTargetAsmInfo() const; - + protected: + // To avoid having target depend on the asmprinter stuff libraries, + // asmprinter set this functions to ctor pointer at startup time if they are + // linked in. + typedef FunctionPass *(*AsmPrinterCtorFn)(raw_ostream &o, + MipsTargetMachine &tm, + CodeGenOpt::Level OptLevel, + bool verbose); + static AsmPrinterCtorFn AsmPrinterCtor; + public: MipsTargetMachine(const Module &M, const std::string &FS, bool isLittle); + static void registerAsmPrinter(AsmPrinterCtorFn F) { + AsmPrinterCtor = F; + } + virtual const MipsInstrInfo *getInstrInfo() const { return &InstrInfo; } virtual const TargetFrameInfo *getFrameInfo() const |
