[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
Mon Dec 2 22:15:02 PST 2024


================
@@ -46,12 +46,12 @@ void JITLinkRedirectableSymbolManager::emitRedirectableSymbols(
 
     auto PtrName = ES.intern((*Name + StubSuffix).str());
     auto &Ptr = AnonymousPtrCreator(*G, PointerSection, TargetSym, 0);
-    Ptr.setName(*PtrName);
+    Ptr.setName(PtrName);
     Ptr.setScope(jitlink::Scope::Hidden);
     auto &Stub = PtrJumpStubCreator(*G, StubsSection, Ptr);
-    Stub.setName(*Name);
+    Stub.setName(Name);
     Stub.setScope(jitlink::Scope::Default);
-    NewSymbols[std::move(PtrName)] = JITSymbolFlags();
+    NewSymbols[PtrName] = JITSymbolFlags();
----------------
lhames wrote:

Keep the `std::move` here: We're done with the value and this'll save a copy.

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


More information about the llvm-commits mailing list