mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 06:30:19 +00:00
3c14ca47fc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110791 91177308-0d34-0410-b5e6-96231b3b80d8
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
//===-- MCAsmParser.cpp - Abstract Asm Parser Interface -------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/MC/MCParser/MCAsmParser.h"
|
|
#include "llvm/ADT/Twine.h"
|
|
#include "llvm/MC/MCParser/MCAsmLexer.h"
|
|
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
|
|
#include "llvm/Support/SourceMgr.h"
|
|
#include "llvm/Target/TargetAsmParser.h"
|
|
using namespace llvm;
|
|
|
|
MCAsmParser::MCAsmParser() : TargetParser(0), ShowParsedOperands(0) {
|
|
}
|
|
|
|
MCAsmParser::~MCAsmParser() {
|
|
}
|
|
|
|
void MCAsmParser::setTargetParser(TargetAsmParser &P) {
|
|
assert(!TargetParser && "Target parser is already initialized!");
|
|
TargetParser = &P;
|
|
TargetParser->Initialize(*this);
|
|
}
|
|
|
|
const AsmToken &MCAsmParser::getTok() {
|
|
return getLexer().getTok();
|
|
}
|
|
|
|
bool MCAsmParser::TokError(const Twine &Msg) {
|
|
Error(getLexer().getLoc(), Msg);
|
|
return true;
|
|
}
|
|
|
|
bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
|
|
SMLoc L;
|
|
return ParseExpression(Res, L);
|
|
}
|
|
|
|
|