[llvm] r354598 - [Kaleidoscope] Fix symbol resolver to search in reverse order.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 21 08:53:04 PST 2019
Author: lhames
Date: Thu Feb 21 08:53:04 2019
New Revision: 354598
URL: http://llvm.org/viewvc/llvm-project?rev=354598&view=rev
Log:
[Kaleidoscope] Fix symbol resolver to search in reverse order.
This should allow more recent definitions of functions in the Kaleidoscope REPL
to override old ones, as the tutorial text promises.
Modified:
llvm/trunk/examples/Kaleidoscope/include/KaleidoscopeJIT.h
Modified: llvm/trunk/examples/Kaleidoscope/include/KaleidoscopeJIT.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/include/KaleidoscopeJIT.h?rev=354598&r1=354597&r2=354598&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/include/KaleidoscopeJIT.h (original)
+++ llvm/trunk/examples/Kaleidoscope/include/KaleidoscopeJIT.h Thu Feb 21 08:53:04 2019
@@ -46,7 +46,7 @@ public:
: Resolver(createLegacyLookupResolver(
ES,
[this](const std::string &Name) {
- return ObjectLayer.findSymbol(Name, true);
+ return findMangledSymbol(Name);
},
[](Error Err) { cantFail(std::move(Err), "lookupFlags failed"); })),
TM(EngineBuilder().selectTarget()), DL(TM->createDataLayout()),
More information about the llvm-commits
mailing list