blob: 3867691107fb52936489b5a35e94f6998a555b6b [file] [log] [blame]
//===-- MCAsmLexer.cpp - Abstract Asm Lexer 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/MCAsmLexer.h"
#include "llvm/Support/SourceMgr.h"
using namespace llvm;
MCAsmLexer::MCAsmLexer() : CurTok(AsmToken::Error, StringRef()),
TokStart(0), SkipSpace(true) {
}
MCAsmLexer::~MCAsmLexer() {
}
SMLoc MCAsmLexer::getLoc() const {
return SMLoc::getFromPointer(TokStart);
}
SMLoc AsmToken::getLoc() const {
return SMLoc::getFromPointer(Str.data());
}
SMLoc AsmToken::getEndLoc() const {
return SMLoc::getFromPointer(Str.data() + Str.size());
}