Skip to content

Commit 41b572b

Browse files
committed
[ORC][examples] Simplify example -- LLJIT already has a mangleAndIntern method.
We don't need a separate MangleAndInterner here any more.
1 parent f9898cf commit 41b572b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/examples/OrcV2Examples/LLJITWithLazyReexports/LLJITWithLazyReexports.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,12 @@ int main(int argc, char *argv[]) {
130130
ExitOnErr(J->addIRModule(ExitOnErr(parseExampleModule(MainMod, "main-mod"))));
131131

132132
// (5) Add lazy reexports.
133-
MangleAndInterner Mangle(J->getExecutionSession(), J->getDataLayout());
134133
SymbolAliasMap ReExports(
135-
{{Mangle("foo"),
136-
{Mangle("foo_body"),
134+
{{J->mangleAndIntern("foo"),
135+
{J->mangleAndIntern("foo_body"),
137136
JITSymbolFlags::Exported | JITSymbolFlags::Callable}},
138-
{Mangle("bar"),
139-
{Mangle("bar_body"),
137+
{J->mangleAndIntern("bar"),
138+
{J->mangleAndIntern("bar_body"),
140139
JITSymbolFlags::Exported | JITSymbolFlags::Callable}}});
141140
ExitOnErr(J->getMainJITDylib().define(
142141
lazyReexports(*LCTM, *ISM, J->getMainJITDylib(), std::move(ReExports))));

0 commit comments

Comments
 (0)