diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-13 23:48:47 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-13 23:48:47 +0000 |
commit | 789457847002f5289dbbc5cfce9d68c72e00bed1 (patch) | |
tree | c7578069bc5016562bc179874b60c61dc10956d4 /include | |
parent | bb23973934ddbcce3a74647bc70afc12862ed29e (diff) | |
download | external_llvm-789457847002f5289dbbc5cfce9d68c72e00bed1.zip external_llvm-789457847002f5289dbbc5cfce9d68c72e00bed1.tar.gz external_llvm-789457847002f5289dbbc5cfce9d68c72e00bed1.tar.bz2 |
TargetRegistry: Change AsmPrinter constructor to be typed as returning an
AsmPrinter instance (instead of just a FunctionPass)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetRegistry.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/include/llvm/Target/TargetRegistry.h b/include/llvm/Target/TargetRegistry.h index bfb23ef..ebdb36c 100644 --- a/include/llvm/Target/TargetRegistry.h +++ b/include/llvm/Target/TargetRegistry.h @@ -24,7 +24,7 @@ #include <cassert> namespace llvm { - class FunctionPass; + class AsmPrinter; class MCAsmParser; class Module; class TargetAsmInfo; @@ -51,10 +51,10 @@ namespace llvm { typedef TargetMachine *(*TargetMachineCtorTy)(const Target &T, const std::string &TT, const std::string &Features); - typedef FunctionPass *(*AsmPrinterCtorTy)(formatted_raw_ostream &OS, - TargetMachine &TM, - const TargetAsmInfo *TAI, - bool VerboseAsm); + typedef AsmPrinter *(*AsmPrinterCtorTy)(formatted_raw_ostream &OS, + TargetMachine &TM, + const TargetAsmInfo *TAI, + bool VerboseAsm); typedef TargetAsmParser *(*AsmParserCtorTy)(const Target &T, MCAsmParser &P); private: @@ -139,10 +139,8 @@ namespace llvm { } /// createAsmPrinter - Create a target specific assembly printer pass. - FunctionPass *createAsmPrinter(formatted_raw_ostream &OS, - TargetMachine &TM, - const TargetAsmInfo *TAI, - bool Verbose) const { + AsmPrinter *createAsmPrinter(formatted_raw_ostream &OS, TargetMachine &TM, + const TargetAsmInfo *TAI, bool Verbose) const { if (!AsmPrinterCtorFn) return 0; return AsmPrinterCtorFn(OS, TM, TAI, Verbose); @@ -407,10 +405,8 @@ namespace llvm { } private: - static FunctionPass *Allocator(formatted_raw_ostream &OS, - TargetMachine &TM, - const TargetAsmInfo *TAI, - bool Verbose) { + static AsmPrinter *Allocator(formatted_raw_ostream &OS, TargetMachine &TM, + const TargetAsmInfo *TAI, bool Verbose) { return new AsmPrinterImpl(OS, TM, TAI, Verbose); } }; |