[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.

llvm-svn: 354598
This commit is contained in:
Lang Hames 2019-02-21 16:53:04 +00:00
parent 52d5781c87
commit ddf91af5a6
1 changed files with 1 additions and 1 deletions

View File

@ -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()),