[PATCH] D102707: Fix non-global-value-max-name-size not considered by LLParser

Hasyimi Bahrudin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 03:15:36 PDT 2021


hasyimibhar added inline comments.


================
Comment at: llvm/lib/AsmParser/LLParser.cpp:3122
+  // lookup will fail if Name exceeds the size cap.
+  Value *Val = F.getValueSymbolTable()->lookup(capLocalValueName(Name));
 
----------------
serge-sans-paille wrote:
> This is starting to looks like an invariant that should be maintained (or at least checked) by the value symbol table itself, instead of being enforced at callsite. 
I'm not that familiar with the value symbol table. Does it only contain local value names? If yes, then we can just move the check into the lookup function. If it can also contain global value names, then I'm not sure how it can determine whether or not to cap it just from the provided StringRef.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102707/new/

https://reviews.llvm.org/D102707



More information about the llvm-commits mailing list