diff options
author | Lang Hames <lhames@gmail.com> | 2015-02-26 19:28:37 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-02-26 19:28:37 +0000 |
commit | f8ef71c17eae137d19fed3c147bb503fe4a5e5be (patch) | |
tree | 6519f1557f626add723f9c7556b6fdba20c4fe2d | |
parent | 9aaab55800ebcfd30d4474a8b16bbdda9680cd98 (diff) | |
download | bcm5719-llvm-f8ef71c17eae137d19fed3c147bb503fe4a5e5be.tar.gz bcm5719-llvm-f8ef71c17eae137d19fed3c147bb503fe4a5e5be.zip |
[Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
llvm-svn: 230664
-rw-r--r-- | llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp b/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp index 333cb94e365..2e65756049f 100644 --- a/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp +++ b/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp @@ -1223,6 +1223,10 @@ public: return findSymbol(mangle(Name)); } + JITSymbol findUnmangledSymbolIn(ModuleHandleT H, const std::string &Name) { + return findSymbolIn(H, mangle(Name)); + } + private: // This method searches the FunctionDefs map for a definition of 'Name'. If it @@ -1284,7 +1288,7 @@ private: std::shared_ptr<FunctionAST> Fn = std::move(FnAST); CallbackInfo.setCompileAction([this, Fn]() { auto H = addModule(IRGen(Session, *Fn)); - return findSymbolIn(H, Fn->Proto->Name).getAddress(); + return findUnmangledSymbolIn(H, Fn->Proto->Name).getAddress(); }); CallbackInfo.setUpdateAction( CompileCallbacks.getLocalFPUpdater(H, mangle(BodyPtrName))); |