From 41b572b99cd5f222330effa323af9c4da8d73e10 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sun, 23 Mar 2025 11:25:01 +1100 Subject: [PATCH] [ORC][examples] Simplify example -- LLJIT already has a mangleAndIntern method. We don't need a separate MangleAndInterner here any more. --- .../LLJITWithLazyReexports/LLJITWithLazyReexports.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/llvm/examples/OrcV2Examples/LLJITWithLazyReexports/LLJITWithLazyReexports.cpp b/llvm/examples/OrcV2Examples/LLJITWithLazyReexports/LLJITWithLazyReexports.cpp index dc1edb16a560..f68f35c0ee29 100644 --- a/llvm/examples/OrcV2Examples/LLJITWithLazyReexports/LLJITWithLazyReexports.cpp +++ b/llvm/examples/OrcV2Examples/LLJITWithLazyReexports/LLJITWithLazyReexports.cpp @@ -130,13 +130,12 @@ int main(int argc, char *argv[]) { ExitOnErr(J->addIRModule(ExitOnErr(parseExampleModule(MainMod, "main-mod")))); // (5) Add lazy reexports. - MangleAndInterner Mangle(J->getExecutionSession(), J->getDataLayout()); SymbolAliasMap ReExports( - {{Mangle("foo"), - {Mangle("foo_body"), + {{J->mangleAndIntern("foo"), + {J->mangleAndIntern("foo_body"), JITSymbolFlags::Exported | JITSymbolFlags::Callable}}, - {Mangle("bar"), - {Mangle("bar_body"), + {J->mangleAndIntern("bar"), + {J->mangleAndIntern("bar_body"), JITSymbolFlags::Exported | JITSymbolFlags::Callable}}}); ExitOnErr(J->getMainJITDylib().define( lazyReexports(*LCTM, *ISM, J->getMainJITDylib(), std::move(ReExports))));