summaryrefslogtreecommitdiff
path: root/lib/MC/MCParser/MCAsmParser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-10-16 04:47:35 +0000
committerChris Lattner <sabre@nondot.org>2011-10-16 04:47:35 +0000
commitd8b7aa26134d2abee777f745c32005e63dea2455 (patch)
treeedc5453a63624cef371ed386f811fb2651024d33 /lib/MC/MCParser/MCAsmParser.cpp
parent17730847d59c919d97f097d46a3fcba1888e5300 (diff)
downloadllvm-d8b7aa26134d2abee777f745c32005e63dea2455.tar.gz
llvm-d8b7aa26134d2abee777f745c32005e63dea2455.tar.bz2
llvm-d8b7aa26134d2abee777f745c32005e63dea2455.tar.xz
Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/MCAsmParser.cpp')
-rw-r--r--lib/MC/MCParser/MCAsmParser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MCParser/MCAsmParser.cpp b/lib/MC/MCParser/MCAsmParser.cpp
index 5239ec753e..3a825f03b7 100644
--- a/lib/MC/MCParser/MCAsmParser.cpp
+++ b/lib/MC/MCParser/MCAsmParser.cpp
@@ -33,8 +33,8 @@ const AsmToken &MCAsmParser::getTok() {
return getLexer().getTok();
}
-bool MCAsmParser::TokError(const Twine &Msg) {
- Error(getLexer().getLoc(), Msg);
+bool MCAsmParser::TokError(const Twine &Msg, ArrayRef<SMRange> Ranges) {
+ Error(getLexer().getLoc(), Msg, Ranges);
return true;
}