mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
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
This commit is contained in:
parent
ac29c0af3d
commit
1b84cce77f
@ -24,7 +24,6 @@ class MCTargetAsmParser;
|
||||
class SMLoc;
|
||||
class SourceMgr;
|
||||
class StringRef;
|
||||
class Target;
|
||||
class Twine;
|
||||
|
||||
/// MCAsmParser - Generic assembler parser interface, for use by target specific
|
||||
@ -131,7 +130,7 @@ public:
|
||||
};
|
||||
|
||||
/// \brief Create an MCAsmParser instance.
|
||||
MCAsmParser *createMCAsmParser(const Target &, SourceMgr &, MCContext &,
|
||||
MCAsmParser *createMCAsmParser(SourceMgr &, MCContext &,
|
||||
MCStreamer &, const MCAsmInfo &);
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -109,7 +109,7 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MDNode *LocMDNode) const {
|
||||
// Tell SrcMgr about this buffer, it takes ownership of the buffer.
|
||||
SrcMgr.AddNewSourceBuffer(Buffer, SMLoc());
|
||||
|
||||
OwningPtr<MCAsmParser> Parser(createMCAsmParser(TM.getTarget(), SrcMgr,
|
||||
OwningPtr<MCAsmParser> Parser(createMCAsmParser(SrcMgr,
|
||||
OutContext, OutStreamer,
|
||||
*MAI));
|
||||
|
||||
|
@ -362,7 +362,7 @@ int EDDisassembler::parseInst(SmallVectorImpl<MCParsedAsmOperand*> &operands,
|
||||
sourceMgr.AddNewSourceBuffer(buf, SMLoc()); // ownership of buf handed over
|
||||
MCContext context(*AsmInfo, *MRI, NULL);
|
||||
OwningPtr<MCStreamer> streamer(createNullStreamer(context));
|
||||
OwningPtr<MCAsmParser> genericParser(createMCAsmParser(*Tgt, sourceMgr,
|
||||
OwningPtr<MCAsmParser> genericParser(createMCAsmParser(sourceMgr,
|
||||
context, *streamer,
|
||||
*AsmInfo));
|
||||
|
||||
|
@ -116,7 +116,7 @@ private:
|
||||
unsigned HadError : 1;
|
||||
|
||||
public:
|
||||
AsmParser(const Target &T, SourceMgr &SM, MCContext &Ctx, MCStreamer &Out,
|
||||
AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out,
|
||||
const MCAsmInfo &MAI);
|
||||
~AsmParser();
|
||||
|
||||
@ -338,7 +338,7 @@ extern MCAsmParserExtension *createCOFFAsmParser();
|
||||
|
||||
enum { DEFAULT_ADDRSPACE = 0 };
|
||||
|
||||
AsmParser::AsmParser(const Target &T, SourceMgr &_SM, MCContext &_Ctx,
|
||||
AsmParser::AsmParser(SourceMgr &_SM, MCContext &_Ctx,
|
||||
MCStreamer &_Out, const MCAsmInfo &_MAI)
|
||||
: Lexer(_MAI), Ctx(_Ctx), Out(_Out), MAI(_MAI), SrcMgr(_SM),
|
||||
GenericParser(new GenericAsmParser), PlatformParser(0),
|
||||
@ -2713,8 +2713,8 @@ bool GenericAsmParser::ParseDirectiveLEB128(StringRef DirName, SMLoc) {
|
||||
|
||||
|
||||
/// \brief Create an MCAsmParser instance.
|
||||
MCAsmParser *llvm::createMCAsmParser(const Target &T, SourceMgr &SM,
|
||||
MCAsmParser *llvm::createMCAsmParser(SourceMgr &SM,
|
||||
MCContext &C, MCStreamer &Out,
|
||||
const MCAsmInfo &MAI) {
|
||||
return new AsmParser(T, SM, C, Out, MAI);
|
||||
return new AsmParser(SM, C, Out, MAI);
|
||||
}
|
||||
|
@ -413,8 +413,8 @@ static int AssembleInput(const char *ProgName) {
|
||||
Str.reset(createLoggingStreamer(Str.take(), errs()));
|
||||
}
|
||||
|
||||
OwningPtr<MCAsmParser> Parser(createMCAsmParser(*TheTarget, SrcMgr, Ctx,
|
||||
*Str.get(), *MAI));
|
||||
OwningPtr<MCAsmParser> Parser(createMCAsmParser(SrcMgr, Ctx,
|
||||
*Str.get(), *MAI));
|
||||
OwningPtr<MCTargetAsmParser> TAP(TheTarget->createMCAsmParser(*STI, *Parser));
|
||||
if (!TAP) {
|
||||
errs() << ProgName
|
||||
|
@ -619,7 +619,7 @@ bool LTOModule::addAsmGlobalSymbols(MCContext &Context) {
|
||||
MemoryBuffer *Buffer = MemoryBuffer::getMemBuffer(inlineAsm);
|
||||
SourceMgr SrcMgr;
|
||||
SrcMgr.AddNewSourceBuffer(Buffer, SMLoc());
|
||||
OwningPtr<MCAsmParser> Parser(createMCAsmParser(_target->getTarget(), SrcMgr,
|
||||
OwningPtr<MCAsmParser> Parser(createMCAsmParser(SrcMgr,
|
||||
Context, *Streamer,
|
||||
*_target->getMCAsmInfo()));
|
||||
OwningPtr<MCSubtargetInfo> STI(_target->getTarget().
|
||||
|
Loading…
Reference in New Issue
Block a user