Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 5300f55

Browse files
committed
[Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230664 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 532af68 commit 5300f55

File tree

1 file changed

+5
-1
lines changed
  • examples/Kaleidoscope/Orc/fully_lazy

1 file changed

+5
-1
lines changed

examples/Kaleidoscope/Orc/fully_lazy/toy.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,10 @@ class KaleidoscopeJIT {
12231223
return findSymbol(mangle(Name));
12241224
}
12251225

1226+
JITSymbol findUnmangledSymbolIn(ModuleHandleT H, const std::string &Name) {
1227+
return findSymbolIn(H, mangle(Name));
1228+
}
1229+
12261230
private:
12271231

12281232
// This method searches the FunctionDefs map for a definition of 'Name'. If it
@@ -1284,7 +1288,7 @@ class KaleidoscopeJIT {
12841288
std::shared_ptr<FunctionAST> Fn = std::move(FnAST);
12851289
CallbackInfo.setCompileAction([this, Fn]() {
12861290
auto H = addModule(IRGen(Session, *Fn));
1287-
return findSymbolIn(H, Fn->Proto->Name).getAddress();
1291+
return findUnmangledSymbolIn(H, Fn->Proto->Name).getAddress();
12881292
});
12891293
CallbackInfo.setUpdateAction(
12901294
CompileCallbacks.getLocalFPUpdater(H, mangle(BodyPtrName)));

0 commit comments

Comments
 (0)