[PATCH] D50808: [MC, RISCV] Fixed StringRef Assertion `Index < Length && "Invalid index!"'
Ana Pazos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 24 18:05:21 PDT 2018
apazos added inline comments.
================
Comment at: lib/MC/MCParser/AsmParser.cpp:1845
// Directives start with "."
- if (IDVal[0] == '.' && IDVal != ".") {
+ if (IDVal.size() && IDVal[0] == '.' && IDVal != ".") {
// There are several entities interested in parsing directives:
----------------
rnk wrote:
> I'd probably spell it `IDVal.startswith(".")` for readability.
good suggestion, will update the patch and merge. Thanks, Reid.
https://reviews.llvm.org/D50808
More information about the llvm-commits
mailing list