aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/StringRefTest.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2021-12-08 15:13:40 -0800
committerCraig Topper <craig.topper@sifive.com>2021-12-08 15:32:44 -0800
commitde8d26ac026452620b8584addfa4171671f2765c (patch)
tree9c64e82669c0c5219d4e9b590e86a80c1bd1f1ea /llvm/unittests/ADT/StringRefTest.cpp
parentedf410e48f5b5ec8e5f7b4cb6c9b578c1e0a067f (diff)
downloadllvm-de8d26ac026452620b8584addfa4171671f2765c.zip
llvm-de8d26ac026452620b8584addfa4171671f2765c.tar.gz
llvm-de8d26ac026452620b8584addfa4171671f2765c.tar.bz2
[RISCV] Improve tracking of EndLoc in the assembly parser.
The SMLoc::getFromPointer(S.getPointer() - 1) pattern used in several place didn't make sense since that puts the End before the Start location. This patch corrects this to properly calculate the end location as we parse. Unsure how much this matters, a lot of these are for custom operand parsing. If the custom parsing succeeds, the instruction matching probably won't fail, so the end loc won't be used to build a range for a diagnostic. I've also fixed the creation functions for the CSR and VType operands to assign the EndLoc of the RISCVOperand class using the StartLoc instead of an empty SMLoc. I don't think these will ever be accessed, but it makes the code look less like we forgot to assign it. This is consistent with some operands on the ARM target. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D115192
Diffstat (limited to 'llvm/unittests/ADT/StringRefTest.cpp')
0 files changed, 0 insertions, 0 deletions