[llvm-commits] [llvm] r82392 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Sun Sep 20 00:37:51 PDT 2009
Author: lattner
Date: Sun Sep 20 02:37:51 2009
New Revision: 82392
URL: http://llvm.org/viewvc/llvm-project?rev=82392&view=rev
Log:
simplify this now that createX86CodePrinterPass is trivial
Modified:
llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=82392&r1=82391&r2=82392&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Sun Sep 20 02:37:51 2009
@@ -22,18 +22,6 @@
#include "llvm/Target/TargetRegistry.h"
using namespace llvm;
-/// createX86CodePrinterPass - Returns a pass that prints the X86 assembly code
-/// for a MachineFunction to the given output stream, using the given target
-/// machine description.
-///
-static AsmPrinter *createX86CodePrinterPass(formatted_raw_ostream &o,
- TargetMachine &tm,
- const MCAsmInfo *tai,
- bool verbose) {
- return new X86AsmPrinter(o, tm, tai, verbose);
-}
-
-
static MCInstPrinter *createX86MCInstPrinter(const Target &T,
unsigned SyntaxVariant,
const MCAsmInfo &MAI,
@@ -47,8 +35,8 @@
// Force static initialization.
extern "C" void LLVMInitializeX86AsmPrinter() {
- TargetRegistry::RegisterAsmPrinter(TheX86_32Target, createX86CodePrinterPass);
- TargetRegistry::RegisterAsmPrinter(TheX86_64Target, createX86CodePrinterPass);
+ RegisterAsmPrinter<X86AsmPrinter> X(TheX86_32Target);
+ RegisterAsmPrinter<X86AsmPrinter> Y(TheX86_64Target);
TargetRegistry::RegisterMCInstPrinter(TheX86_32Target,createX86MCInstPrinter);
TargetRegistry::RegisterMCInstPrinter(TheX86_64Target,createX86MCInstPrinter);
More information about the llvm-commits
mailing list