MC: Move AsmParser::TokError to MCAsmParser().
[oota-llvm.git] / lib / MC / MCParser / MCAsmParser.cpp
1 //===-- 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
10 #include "llvm/MC/MCParser/MCAsmParser.h"
11 #include "llvm/ADT/Twine.h"
12 #include "llvm/MC/MCParser/MCAsmLexer.h"
13 #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
14 #include "llvm/Support/SourceMgr.h"
15 using namespace llvm;
16
17 MCAsmParser::MCAsmParser() {
18 }
19
20 MCAsmParser::~MCAsmParser() {
21 }
22
23 const AsmToken &MCAsmParser::getTok() {
24   return getLexer().getTok();
25 }
26
27 bool MCAsmParser::TokError(const char *Msg) {
28   Error(getLexer().getLoc(), Msg);
29   return true;
30 }
31
32 bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
33   SMLoc L;
34   return ParseExpression(Res, L);
35 }
36
37 /// getStartLoc - Get the location of the first token of this operand.
38 SMLoc MCParsedAsmOperand::getStartLoc() const { return SMLoc(); }
39 SMLoc MCParsedAsmOperand::getEndLoc() const { return SMLoc(); }
40
41