diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-09-30 21:24:45 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-09-30 21:24:45 +0000 |
commit | b6e4742da7ecada32ba8d018f7292a837d5d90a9 (patch) | |
tree | 66ecc63e186b5d335af75102004bd384da7fce1a /lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | |
parent | 1fb613c43de4dc6d6955be6054a7300de8f2d79b (diff) | |
download | llvm-b6e4742da7ecada32ba8d018f7292a837d5d90a9.tar.gz llvm-b6e4742da7ecada32ba8d018f7292a837d5d90a9.tar.bz2 llvm-b6e4742da7ecada32ba8d018f7292a837d5d90a9.tar.xz |
The AsmPrinter base class contains a DwarfWriter member, so there's no need
for derived AsmPrinters to add another one. In some cases, fixing this
removes the need to override the doInitialization method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83170 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp')
-rw-r--r-- | lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp index fe45ec3524..65378df42e 100644 --- a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp +++ b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp @@ -53,12 +53,11 @@ static cl::opt<unsigned> MaxThreads("xcore-max-threads", cl::Optional, namespace { class VISIBILITY_HIDDEN XCoreAsmPrinter : public AsmPrinter { - DwarfWriter *DW; const XCoreSubtarget &Subtarget; public: explicit XCoreAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, const MCAsmInfo *T, bool V) - : AsmPrinter(O, TM, T, V), DW(0), + : AsmPrinter(O, TM, T, V), Subtarget(TM.getSubtarget<XCoreSubtarget>()) {} virtual const char *getPassName() const { @@ -84,7 +83,6 @@ namespace { void printMachineInstruction(const MachineInstr *MI); bool runOnMachineFunction(MachineFunction &F); - bool doInitialization(Module &M); void getAnalysisUsage(AnalysisUsage &AU) const { AsmPrinter::getAnalysisUsage(AU); @@ -369,13 +367,6 @@ void XCoreAsmPrinter::printMachineInstruction(const MachineInstr *MI) { O << '\n'; } -bool XCoreAsmPrinter::doInitialization(Module &M) { - bool Result = AsmPrinter::doInitialization(M); - DW = getAnalysisIfAvailable<DwarfWriter>(); - - return Result; -} - // Force static initialization. extern "C" void LLVMInitializeXCoreAsmPrinter() { RegisterAsmPrinter<XCoreAsmPrinter> X(TheXCoreTarget); |