aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2021-04-25 13:56:08 +0200
committerMark de Wever <koraq@xs4all.nl>2021-04-25 13:56:41 +0200
commit1cea7ab4ba13346745d6aa6e117ee2e77995fb07 (patch)
tree1a84db4ac7e1b574014129bef324ee911687b74c /llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
parent535df472b04208d6ae88e017c8f1d831fb239346 (diff)
downloadllvm-1cea7ab4ba13346745d6aa6e117ee2e77995fb07.zip
llvm-1cea7ab4ba13346745d6aa6e117ee2e77995fb07.tar.gz
llvm-1cea7ab4ba13346745d6aa6e117ee2e77995fb07.tar.bz2
[demangler] Use standard semantics for StringView::substr
The StringView::substr now accepts a substring starting position and its length instead of previous non-standard `from` & `to` positions. All uses of two argument StringView::substr are in MicrosoftDemangler and have 0 as a starting position, so no changes are necessary. This also fixes a bug where attempting to extract a suffix with substr (a `to` position equal to size) would return a substring without the last character. Fixing the issue should not introduce observable changes in the demangler, since as currently used, a second argument to StringView::substr is either: 1) a result of a successful call to StringView::find and so necessarily smaller than size., or 2) in the case of Demangler::demangleCharLiteral potentially equal to size, but with demangler expecting more data to follow later on and failing either way. Reviewed By: #libc_abi, ldionne, erik.pilkington Differential Revision: https://reviews.llvm.org/D100246
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions