[llvm] r230664 - [Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
Lang Hames
lhames at gmail.com
Thu Feb 26 11:28:37 PST 2015
Author: lhames
Date: Thu Feb 26 13:28:37 2015
New Revision: 230664
URL: http://llvm.org/viewvc/llvm-project?rev=230664&view=rev
Log:
[Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
Modified:
llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
Modified: llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp?rev=230664&r1=230663&r2=230664&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp Thu Feb 26 13:28:37 2015
@@ -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)));
More information about the llvm-commits
mailing list