[PATCH] D41296: Limit size of non-GlobalValue name
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 21 13:39:11 PST 2017
mehdi_amini added inline comments.
================
Comment at: lib/IR/Value.cpp:254
+ NameRef = NameRef.substr(0, NonGlobalValueMaxNameSize);
+
assert(!getType()->isVoidTy() && "Cannot assign a name to void values!");
----------------
It is unfortunate that the Twine as already been serialized past the limit, trigger memory allocation in the SmallString. But unless Twine would be significantly revamped, I don't see how to do better.
Repository:
rL LLVM
https://reviews.llvm.org/D41296
More information about the llvm-commits
mailing list