Silence -Wunused-variable in release builds.
[llvm/stm8.git] / lib / MC / MCParser / MCAsmParser.cpp
blob70295efc613ca0a6bebb23d087f4919118f82e7c
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 //===----------------------------------------------------------------------===//
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 #include "llvm/Target/TargetAsmParser.h"
16 using namespace llvm;
18 MCAsmParser::MCAsmParser() : TargetParser(0), ShowParsedOperands(0) {
21 MCAsmParser::~MCAsmParser() {
24 void MCAsmParser::setTargetParser(TargetAsmParser &P) {
25 assert(!TargetParser && "Target parser is already initialized!");
26 TargetParser = &P;
27 TargetParser->Initialize(*this);
30 const AsmToken &MCAsmParser::getTok() {
31 return getLexer().getTok();
34 bool MCAsmParser::TokError(const Twine &Msg) {
35 Error(getLexer().getLoc(), Msg);
36 return true;
39 bool MCAsmParser::ParseExpression(const MCExpr *&Res) {
40 SMLoc L;
41 return ParseExpression(Res, L);