Mercurial > hg > CbC > CbC_llvm
view lib/MC/MCParser/MCAsmLexer.cpp @ 124:4fa72497ed5d
fix
author | mir3636 |
---|---|
date | Thu, 30 Nov 2017 20:04:56 +0900 |
parents | 803732b1fca8 |
children | c2174574ed3a |
line wrap: on
line source
//===- 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/ADT/StringRef.h" #include "llvm/Support/SMLoc.h" using namespace llvm; MCAsmLexer::MCAsmLexer() : AltMacroMode(false) { CurTok.emplace_back(AsmToken::Space, StringRef()); } MCAsmLexer::~MCAsmLexer() = default; 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()); } SMRange AsmToken::getLocRange() const { return SMRange(getLoc(), getEndLoc()); }