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