[llvm] Move a lot of symbol code to use the symbol string pool (PR #115796)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 22:35:35 PST 2024


================
@@ -106,14 +106,14 @@ Symbol &createELFGOTHeader(LinkGraph &G,
   Symbol *TOCSymbol = nullptr;
 
   for (Symbol *Sym : G.defined_symbols())
-    if (LLVM_UNLIKELY(Sym->getName() == ELFTOCSymbolName)) {
+    if (LLVM_UNLIKELY(Sym->hasName() && *Sym->getName() == ELFTOCSymbolName)) {
----------------
lhames wrote:

Ahh -- it's not interned yet. This is another candidate for interning post-commit.

https://github.com/llvm/llvm-project/pull/115796


More information about the llvm-commits mailing list