mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
Fix the position of the caret in the FileCheck error message.
Before: test/CodeGen/X86/lsr-reuse.ll:52:34: error: expected string not found in input ; CHECK: movsd -2048(%rsi), %xmm0 ^ After: test/CodeGen/X86/lsr-reuse.ll:52:10: error: expected string not found in input ; CHECK: movsd -2048(%rsi), %xmm0 ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94846 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fcb0ee8ffe
commit
e546343799
@ -524,6 +524,9 @@ static bool ReadCheckFile(SourceMgr &SM,
|
|||||||
// Scan ahead to the end of line.
|
// Scan ahead to the end of line.
|
||||||
size_t EOL = Buffer.find_first_of("\n\r");
|
size_t EOL = Buffer.find_first_of("\n\r");
|
||||||
|
|
||||||
|
// Remember the location of the start of the pattern, for diagnostics.
|
||||||
|
SMLoc PatternLoc = SMLoc::getFromPointer(Buffer.data());
|
||||||
|
|
||||||
// Parse the pattern.
|
// Parse the pattern.
|
||||||
Pattern P;
|
Pattern P;
|
||||||
if (P.ParsePattern(Buffer.substr(0, EOL), SM))
|
if (P.ParsePattern(Buffer.substr(0, EOL), SM))
|
||||||
@ -550,7 +553,7 @@ static bool ReadCheckFile(SourceMgr &SM,
|
|||||||
|
|
||||||
// Okay, add the string we captured to the output vector and move on.
|
// Okay, add the string we captured to the output vector and move on.
|
||||||
CheckStrings.push_back(CheckString(P,
|
CheckStrings.push_back(CheckString(P,
|
||||||
SMLoc::getFromPointer(Buffer.data()),
|
PatternLoc,
|
||||||
IsCheckNext));
|
IsCheckNext));
|
||||||
std::swap(NotMatches, CheckStrings.back().NotStrings);
|
std::swap(NotMatches, CheckStrings.back().NotStrings);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user