[PATCH] D143487: [IR] Allow destruction of symbol table entries regardless of DiscardValueNames
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 10:17:05 PDT 2023
efriedma added inline comments.
================
Comment at: llvm/lib/IR/Value.cpp:373
// Name is changing to something new.
- setValueName(ST->createValueName(NameRef, this));
+ if (NeedNewName)
+ setValueName(ST->createValueName(NameRef, this));
----------------
Similarly here... given NameRef is the empty string, if hasName() is true, we hit:
```
if (NameRef.empty())
return;
```
if hasName() is false, we hit:
```
if (getName() == NameRef)
return;
```
So NeedNewName is always true here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143487/new/
https://reviews.llvm.org/D143487
More information about the llvm-commits
mailing list