diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-13 19:38:51 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-13 19:38:51 +0000 |
commit | 67d894ea64bc52245abf3f2ba89122a749d99c53 (patch) | |
tree | 958d3ced50746f0f856f498fd00fd6807362ce01 /lib/Target/X86 | |
parent | 4e8e642eaa969db43b2a3ff6955abf3ca8b6789a (diff) | |
download | external_llvm-67d894ea64bc52245abf3f2ba89122a749d99c53.zip external_llvm-67d894ea64bc52245abf3f2ba89122a749d99c53.tar.gz external_llvm-67d894ea64bc52245abf3f2ba89122a749d99c53.tar.bz2 |
TargetRegistry: Reorganize AsmPrinter construction so that clients pass in the
TargetAsmInfo. This eliminates a dependency on TargetMachine.h from
TargetRegistry.h, which technically was a layering violation.
- Clients probably can only sensibly pass in the same TargetAsmInfo as the
TargetMachine has, but there are only limited clients of this API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp index 1415682..f232159 100644 --- a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp @@ -27,10 +27,11 @@ using namespace llvm; /// static FunctionPass *createX86CodePrinterPass(formatted_raw_ostream &o, TargetMachine &tm, + const TargetAsmInfo *tai, bool verbose) { if (tm.getTargetAsmInfo()->getAssemblerDialect() == 1) - return new X86IntelAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); - return new X86ATTAsmPrinter(o, tm, tm.getTargetAsmInfo(), verbose); + return new X86IntelAsmPrinter(o, tm, tai, verbose); + return new X86ATTAsmPrinter(o, tm, tai, verbose); } // Force static initialization. |