[llvm] Move a lot of symbol code to use the symbol string pool (PR #115796)
Jared Wyles via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 15:29:40 PST 2024
================
@@ -572,9 +573,8 @@ DLLImportDefinitionGenerator::createStubsGraph(const SymbolMap &Resolved) {
// Create __imp_ symbol
jitlink::Symbol &Ptr =
jitlink::x86_64::createAnonymousPointer(*G, Sec, &Target);
- auto NameCopy = G->allocateContent(Twine(getImpPrefix()) + *KV.first);
- StringRef NameCopyRef = StringRef(NameCopy.data(), NameCopy.size());
- Ptr.setName(NameCopyRef);
+ auto name = getImpPrefix() + *KV.first;
+ Ptr.setName(G->intern(name.getSingleStringRef()));
----------------
jaredwy wrote:
Ah damn, not sure how this snuck back in hah.
https://github.com/llvm/llvm-project/pull/115796
More information about the llvm-commits
mailing list