[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 d23e0bcdb9
commit b18fd4d14d

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