blob: bee30641c7fcd25efc7fe896bf6649163921c04f [file] [log] [blame]
Daniel Dunbara3af3702009-07-20 18:55:04 +00001//===-- MCAsmParser.cpp - Abstract Asm Parser Interface -------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Chris Lattnerc6ef2772010-01-22 01:44:57 +000010#include "llvm/MC/MCParser/MCAsmParser.h"
Daniel Dunbardc4c7da2010-07-12 17:18:45 +000011#include "llvm/ADT/Twine.h"
Chris Lattnerc6ef2772010-01-22 01:44:57 +000012#include "llvm/MC/MCParser/MCAsmLexer.h"
13#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
Chris Lattnerb4307b32010-01-15 19:28:38 +000014#include "llvm/Support/SourceMgr.h"
Daniel Dunbara3af3702009-07-20 18:55:04 +000015using namespace llvm;
16
17MCAsmParser::MCAsmParser() {
18}
19
20MCAsmParser::~MCAsmParser() {
21}
Chris Lattnerb4307b32010-01-15 19:28:38 +000022
Sean Callanan18b83232010-01-19 21:44:56 +000023const AsmToken &MCAsmParser::getTok() {
24 return getLexer().getTok();
25}
26
Daniel Dunbardc4c7da2010-07-12 17:18:45 +000027bool MCAsmParser::TokError(const char *Msg) {
28 Error(getLexer().getLoc(), Msg);
29 return true;
30}
31
Chris Lattnerb4307b32010-01-15 19:28:38 +000032bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
33 SMLoc L;
Chris Lattner9521c952010-01-15 19:51:05 +000034 return ParseExpression(Res, L);
Chris Lattnerb4307b32010-01-15 19:28:38 +000035}
36
Chris Lattnerb4307b32010-01-15 19:28:38 +000037/// getStartLoc - Get the location of the first token of this operand.
38SMLoc MCParsedAsmOperand::getStartLoc() const { return SMLoc(); }
39SMLoc MCParsedAsmOperand::getEndLoc() const { return SMLoc(); }
40
41