mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:50:30 +00:00
Remove unused Target argument from AsmParser construction methods.
The argument is unused, and is a layering violation in any case. llvm-svn: 137735
This commit is contained in:
parent
095a0ae3f3
commit
a9a0c62719
@ -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