mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-02 05:17:15 +00:00
MC: Move several clients to using AsmParser constructor function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108645 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -12,13 +12,13 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/MC/MCParser/AsmLexer.h"
|
||||
#include "llvm/MC/MCParser/MCAsmLexer.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCCodeEmitter.h"
|
||||
#include "llvm/MC/MCInstPrinter.h"
|
||||
#include "llvm/MC/MCSectionMachO.h"
|
||||
#include "llvm/MC/MCStreamer.h"
|
||||
#include "llvm/MC/MCParser/AsmParser.h"
|
||||
#include "llvm/Target/TargetAsmBackend.h"
|
||||
#include "llvm/Target/TargetAsmParser.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
@@ -312,17 +312,18 @@ static int AssembleInput(const char *ProgName) {
|
||||
Str.reset(createLoggingStreamer(Str.take(), errs()));
|
||||
}
|
||||
|
||||
AsmParser Parser(*TheTarget, SrcMgr, Ctx, *Str.get(), *MAI);
|
||||
OwningPtr<TargetAsmParser> TAP(TheTarget->createAsmParser(Parser));
|
||||
OwningPtr<MCAsmParser> Parser(createMCAsmParser(*TheTarget, SrcMgr, Ctx,
|
||||
*Str.get(), *MAI));
|
||||
OwningPtr<TargetAsmParser> TAP(TheTarget->createAsmParser(*Parser));
|
||||
if (!TAP) {
|
||||
errs() << ProgName
|
||||
<< ": error: this target does not support assembly parsing.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Parser.setTargetParser(*TAP.get());
|
||||
Parser->setTargetParser(*TAP.get());
|
||||
|
||||
int Res = Parser.Run(NoInitialTextSection);
|
||||
int Res = Parser->Run(NoInitialTextSection);
|
||||
delete Out;
|
||||
|
||||
// Delete output on errors.
|
||||
|
Reference in New Issue
Block a user