llvm.org GIT mirror llvm / 1b84cce
Remove unused Target argument from AsmParser construction methods. The argument is unused, and is a layering violation in any case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137735 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Grosbach 8 years ago
6 changed file(s) with 11 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
2323 class SMLoc;
2424 class SourceMgr;
2525 class StringRef;
26 class Target;
2726 class Twine;
2827
2928 /// MCAsmParser - Generic assembler parser interface, for use by target specific
130129 };
131130
132131 /// \brief Create an MCAsmParser instance.
133 MCAsmParser *createMCAsmParser(const Target &, SourceMgr &, MCContext &,
132 MCAsmParser *createMCAsmParser(SourceMgr &, MCContext &,
134133 MCStreamer &, const MCAsmInfo &);
135134
136135 } // End llvm namespace
108108 // Tell SrcMgr about this buffer, it takes ownership of the buffer.
109109 SrcMgr.AddNewSourceBuffer(Buffer, SMLoc());
110110
111 OwningPtr Parser(createMCAsmParser(TM.getTarget(), SrcMgr,
111 OwningPtr Parser(createMCAsmParser(SrcMgr,
112112 OutContext, OutStreamer,
113113 *MAI));
114114
361361 sourceMgr.AddNewSourceBuffer(buf, SMLoc()); // ownership of buf handed over
362362 MCContext context(*AsmInfo, *MRI, NULL);
363363 OwningPtr streamer(createNullStreamer(context));
364 OwningPtr genericParser(createMCAsmParser(*Tgt, sourceMgr,
364 OwningPtr genericParser(createMCAsmParser(sourceMgr,
365365 context, *streamer,
366366 *AsmInfo));
367367
115115 unsigned HadError : 1;
116116
117117 public:
118 AsmParser(const Target &T, SourceMgr &SM, MCContext &Ctx, MCStreamer &Out,
118 AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out,
119119 const MCAsmInfo &MAI);
120120 ~AsmParser();
121121
337337
338338 enum { DEFAULT_ADDRSPACE = 0 };
339339
340 AsmParser::AsmParser(const Target &T, SourceMgr &_SM, MCContext &_Ctx,
340 AsmParser::AsmParser(SourceMgr &_SM, MCContext &_Ctx,
341341 MCStreamer &_Out, const MCAsmInfo &_MAI)
342342 : Lexer(_MAI), Ctx(_Ctx), Out(_Out), MAI(_MAI), SrcMgr(_SM),
343343 GenericParser(new GenericAsmParser), PlatformParser(0),
27122712
27132713
27142714 /// \brief Create an MCAsmParser instance.
2715 MCAsmParser *llvm::createMCAsmParser(const Target &T, SourceMgr &SM,
2715 MCAsmParser *llvm::createMCAsmParser(SourceMgr &SM,
27162716 MCContext &C, MCStreamer &Out,
27172717 const MCAsmInfo &MAI) {
2718 return new AsmParser(T, SM, C, Out, MAI);
2719 }
2718 return new AsmParser(SM, C, Out, MAI);
2719 }
412412 Str.reset(createLoggingStreamer(Str.take(), errs()));
413413 }
414414
415 OwningPtr Parser(createMCAsmParser(*TheTarget, SrcMgr, Ctx,
416 *Str.get(), *MAI));
415 OwningPtr Parser(createMCAsmParser(SrcMgr, Ctx,
416 *Str.get(), *MAI));
417417 OwningPtr TAP(TheTarget->createMCAsmParser(*STI, *Parser));
418418 if (!TAP) {
419419 errs() << ProgName
618618 MemoryBuffer *Buffer = MemoryBuffer::getMemBuffer(inlineAsm);
619619 SourceMgr SrcMgr;
620620 SrcMgr.AddNewSourceBuffer(Buffer, SMLoc());
621 OwningPtr Parser(createMCAsmParser(_target->getTarget(), SrcMgr,
621 OwningPtr Parser(createMCAsmParser(SrcMgr,
622622 Context, *Streamer,
623623 *_target->getMCAsmInfo()));
624624 OwningPtr STI(_target->getTarget().