mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-24 08:18:33 +00:00
MCParser: introduce Note and use it for ARM AsmParser
Introduce a new virtual method Note into the AsmParser. This completements the existing Warning and Error methods. Use the new method to clean up the output of the unwind routines in the ARM AsmParser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198661 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -190,6 +190,9 @@ class ARMAsmParser : public MCTargetAsmParser {
|
||||
MCAsmParser &getParser() const { return Parser; }
|
||||
MCAsmLexer &getLexer() const { return Parser.getLexer(); }
|
||||
|
||||
void Note(SMLoc L, const Twine &Msg, ArrayRef<SMRange> Ranges = None) {
|
||||
return Parser.Note(L, Msg, Ranges);
|
||||
}
|
||||
bool Warning(SMLoc L, const Twine &Msg,
|
||||
ArrayRef<SMRange> Ranges = None) {
|
||||
return Parser.Warning(L, Msg, Ranges);
|
||||
@@ -8245,7 +8248,7 @@ bool ARMAsmParser::parseDirectiveFPU(SMLoc L) {
|
||||
bool ARMAsmParser::parseDirectiveFnStart(SMLoc L) {
|
||||
if (FnStartLoc.isValid()) {
|
||||
Error(L, ".fnstart starts before the end of previous one");
|
||||
Error(FnStartLoc, "previous .fnstart starts here");
|
||||
Note(FnStartLoc, "previous .fnstart starts here");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8280,12 +8283,12 @@ bool ARMAsmParser::parseDirectiveCantUnwind(SMLoc L) {
|
||||
}
|
||||
if (HandlerDataLoc.isValid()) {
|
||||
Error(L, ".cantunwind can't be used with .handlerdata directive");
|
||||
Error(HandlerDataLoc, ".handlerdata was specified here");
|
||||
Note(HandlerDataLoc, ".handlerdata was specified here");
|
||||
return false;
|
||||
}
|
||||
if (PersonalityLoc.isValid()) {
|
||||
Error(L, ".cantunwind can't be used with .personality directive");
|
||||
Error(PersonalityLoc, ".personality was specified here");
|
||||
Note(PersonalityLoc, ".personality was specified here");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8304,12 +8307,12 @@ bool ARMAsmParser::parseDirectivePersonality(SMLoc L) {
|
||||
}
|
||||
if (CantUnwindLoc.isValid()) {
|
||||
Error(L, ".personality can't be used with .cantunwind directive");
|
||||
Error(CantUnwindLoc, ".cantunwind was specified here");
|
||||
Note(CantUnwindLoc, ".cantunwind was specified here");
|
||||
return false;
|
||||
}
|
||||
if (HandlerDataLoc.isValid()) {
|
||||
Error(L, ".personality must precede .handlerdata directive");
|
||||
Error(HandlerDataLoc, ".handlerdata was specified here");
|
||||
Note(HandlerDataLoc, ".handlerdata was specified here");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8338,7 +8341,7 @@ bool ARMAsmParser::parseDirectiveHandlerData(SMLoc L) {
|
||||
}
|
||||
if (CantUnwindLoc.isValid()) {
|
||||
Error(L, ".handlerdata can't be used with .cantunwind directive");
|
||||
Error(CantUnwindLoc, ".cantunwind was specified here");
|
||||
Note(CantUnwindLoc, ".cantunwind was specified here");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user