mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-04 14:16:09 +00:00

Summary: The register names t4-t7 are not available in the N32 and N64 ABIs. This patch prints a warning, when those names are used in N32/64, along with a fix-it with the correct register names. Patch by Vasileios Kalintiris Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5272 llvm-svn: 218989
37 lines
945 B
C++
37 lines
945 B
C++
//===-- 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(nullptr), 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());
|
|
}
|
|
|
|
SMRange AsmToken::getLocRange() const {
|
|
return SMRange(getLoc(), getEndLoc());
|
|
}
|