[PATCH] D153722: [LLParser] Friendly error out if a non global value's name exceeds max name size
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 27 00:56:20 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/AsmParser/LLParser.cpp:3447
+
+ if (InstNameSize != NameStrSize + 1) {
+ // The name is too long and was trimmed when stored in SmallString with
----------------
So this is based on the assumption that in the "multiple definition" case the name will always be `%name0`? This seems a bit fragile (I'm not entirely confident it is true, and we can't reach a counter with more than one digit here). Is it possible to check InstNameSize < NameStrSize instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153722/new/
https://reviews.llvm.org/D153722
More information about the llvm-commits
mailing list