<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Reid,</div><div dir="ltr"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">It could be a C++14 thing.</blockquote><div><br></div><div>I wondered about that, but turning C++14 on locally doesn't yield the same issue.</div><div><br></div><div>All the failing builders that I see are running MSVC, except for one that is running clang-8.0.0. Is it possible that this is a regression? That seems unlikely, but I want to make sure I rule it out before I move on.</div><div>FWIW: It's the ArrayRef<JITDylib*> overload that should be getting knocked out, and I would not have expected any c++14 or standard library changes to affect that.<br></div><div><br></div><div>In the mean time I will spell out the types to remove the ambiguity.</div><div><br></div><div>Cheers,</div><div>Lang.</div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 23, 2018 at 2:39 PM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think the diagnostic explains it: The initializer list used as the first argument to lookup() is ambiguous between ArrayRef and
JITDylibSearchList. It could be a C++14 thing.<br><br>I'm using clang from a few weeks ago.<div><br></div><div>One major difference is that on Windows, we already have some C++14 and newer library features, so maybe things are more easily constructed from initializer lists.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 23, 2018 at 2:34 PM Lang Hames <<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Reid,<div><br></div><div>Thanks for that. I will update the unit tests to remove the ambiguity.</div><div><br></div><div>I'm not seeing these issues locally though: Out of curiosity do you know if this is due to an older clang, or are clang's resolution rules different on Windows?</div><div><br></div><div>Cheers,</div><div>Lang.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 23, 2018 at 1:56 PM Reid Kleckner via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rnk<br>
Date: Tue Oct 23 13:54:43 2018<br>
New Revision: 345078<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=345078&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=345078&view=rev</a><br>
Log:<br>
Revert r345077 "[ORC] Change how non-exported symbols are matched during lookup."<br>
<br>
Doesn't build on Windows. The call to 'lookup' is ambiguous. Clang and<br>
MSVC agree, anyway.<br>
<br>
<a href="http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/787" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/787</a><br>
C:\b\slave\clang-x64-windows-msvc\build\llvm.src\unittests\ExecutionEngine\Orc\CoreAPIsTest.cpp(315): error C2668: 'llvm::orc::ExecutionSession::lookup': ambiguous call to overloaded function<br>
C:\b\slave\clang-x64-windows-msvc\build\llvm.src\include\llvm/ExecutionEngine/Orc/Core.h(823): note: could be 'llvm::Expected<llvm::JITEvaluatedSymbol> llvm::orc::ExecutionSession::lookup(llvm::ArrayRef<llvm::orc::JITDylib *>,llvm::orc::SymbolStringPtr)'<br>
C:\b\slave\clang-x64-windows-msvc\build\llvm.src\include\llvm/ExecutionEngine/Orc/Core.h(817): note: or 'llvm::Expected<llvm::JITEvaluatedSymbol> llvm::orc::ExecutionSession::lookup(const llvm::orc::JITDylibSearchList &,llvm::orc::SymbolStringPtr)'<br>
C:\b\slave\clang-x64-windows-msvc\build\llvm.src\unittests\ExecutionEngine\Orc\CoreAPIsTest.cpp(315): note: while trying to match the argument list '(initializer list, llvm::orc::SymbolStringPtr)'<br>
<br>
Removed:<br>
llvm/trunk/test/ExecutionEngine/OrcLazy/Inputs/hidden-definitions.ll<br>
llvm/trunk/test/ExecutionEngine/OrcLazy/hidden-visibility.ll<br>
Modified:<br>
llvm/trunk/include/llvm/ExecutionEngine/JITSymbol.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h<br>
llvm/trunk/include/llvm/ExecutionEngine/Orc/LLJIT.h<br>
llvm/trunk/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/ExecutionUtils.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/LLJIT.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/LazyReexports.cpp<br>
llvm/trunk/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp<br>
llvm/trunk/tools/lli/lli.cpp<br>
llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp<br>
llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/JITSymbol.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/JITSymbol.h?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/JITSymbol.h?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/JITSymbol.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/JITSymbol.h Tue Oct 23 13:54:43 2018<br>
@@ -40,18 +40,6 @@ class SymbolRef;<br>
/// Represents an address in the target process's address space.<br>
using JITTargetAddress = uint64_t;<br>
<br>
-/// Convert a JITTargetAddress to a pointer.<br>
-template <typename T> T jitTargetAddressToPointer(JITTargetAddress Addr) {<br>
- static_assert(std::is_pointer<T>::value, "T must be a pointer type");<br>
- uintptr_t IntPtr = static_cast<uintptr_t>(Addr);<br>
- assert(IntPtr == Addr && "JITTargetAddress value out of range for uintptr_t");<br>
- return reinterpret_cast<T>(IntPtr);<br>
-}<br>
-<br>
-template <typename T> JITTargetAddress pointerToJITTargetAddress(T *Ptr) {<br>
- return static_cast<JITTargetAddress>(reinterpret_cast<uintptr_t>(Ptr));<br>
-}<br>
-<br>
/// Flags for symbols in the JIT.<br>
class JITSymbolFlags {<br>
public:<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h Tue Oct 23 13:54:43 2018<br>
@@ -54,8 +54,8 @@ using SymbolFlagsMap = DenseMap<SymbolSt<br>
/// symbols to be obtained for logging.<br>
using SymbolDependenceMap = DenseMap<JITDylib *, SymbolNameSet>;<br>
<br>
-/// A list of (JITDylib*, bool) pairs.<br>
-using JITDylibSearchList = std::vector<std::pair<JITDylib *, bool>>;<br>
+/// A list of JITDylib pointers.<br>
+using JITDylibList = std::vector<JITDylib *>;<br>
<br>
/// Render a SymbolStringPtr.<br>
raw_ostream &operator<<(raw_ostream &OS, const SymbolStringPtr &Sym);<br>
@@ -85,8 +85,8 @@ raw_ostream &operator<<(raw_ostream &OS,<br>
/// Render a MaterializationUnit.<br>
raw_ostream &operator<<(raw_ostream &OS, const MaterializationUnit &MU);<br>
<br>
-/// Render a JITDylibSearchList.<br>
-raw_ostream &operator<<(raw_ostream &OS, const JITDylibSearchList &JDs);<br>
+/// Render a JITDylibList.<br>
+raw_ostream &operator<<(raw_ostream &OS, const JITDylibList &JDs);<br>
<br>
/// Callback to notify client that symbols have been resolved.<br>
using SymbolsResolvedCallback = std::function<void(Expected<SymbolMap>)>;<br>
@@ -351,15 +351,14 @@ using SymbolAliasMap = DenseMap<SymbolSt<br>
class ReExportsMaterializationUnit : public MaterializationUnit {<br>
public:<br>
/// SourceJD is allowed to be nullptr, in which case the source JITDylib is<br>
- /// taken to be whatever JITDylib these definitions are materialized in (and<br>
- /// MatchNonExported has no effect). This is useful for defining aliases<br>
- /// within a JITDylib.<br>
+ /// taken to be whatever JITDylib these definitions are materialized in. This<br>
+ /// is useful for defining aliases within a JITDylib.<br>
///<br>
/// Note: Care must be taken that no sets of aliases form a cycle, as such<br>
/// a cycle will result in a deadlock when any symbol in the cycle is<br>
/// resolved.<br>
- ReExportsMaterializationUnit(JITDylib *SourceJD, bool MatchNonExported,<br>
- SymbolAliasMap Aliases, VModuleKey K);<br>
+ ReExportsMaterializationUnit(JITDylib *SourceJD, SymbolAliasMap Aliases,<br>
+ VModuleKey K);<br>
<br>
StringRef getName() const override;<br>
<br>
@@ -369,7 +368,6 @@ private:<br>
static SymbolFlagsMap extractFlags(const SymbolAliasMap &Aliases);<br>
<br>
JITDylib *SourceJD = nullptr;<br>
- bool MatchNonExported = false;<br>
SymbolAliasMap Aliases;<br>
};<br>
<br>
@@ -387,19 +385,16 @@ private:<br>
inline std::unique_ptr<ReExportsMaterializationUnit><br>
symbolAliases(SymbolAliasMap Aliases, VModuleKey K = VModuleKey()) {<br>
return llvm::make_unique<ReExportsMaterializationUnit>(<br>
- nullptr, true, std::move(Aliases), std::move(K));<br>
+ nullptr, std::move(Aliases), std::move(K));<br>
}<br>
<br>
/// Create a materialization unit for re-exporting symbols from another JITDylib<br>
/// with alternative names/flags.<br>
-/// If MatchNonExported is true then non-exported symbols from SourceJD can be<br>
-/// re-exported. If it is false, attempts to re-export a non-exported symbol<br>
-/// will result in a "symbol not found" error.<br>
inline std::unique_ptr<ReExportsMaterializationUnit><br>
reexports(JITDylib &SourceJD, SymbolAliasMap Aliases,<br>
- bool MatchNonExported = false, VModuleKey K = VModuleKey()) {<br>
+ VModuleKey K = VModuleKey()) {<br>
return llvm::make_unique<ReExportsMaterializationUnit>(<br>
- &SourceJD, MatchNonExported, std::move(Aliases), std::move(K));<br>
+ &SourceJD, std::move(Aliases), std::move(K));<br>
}<br>
<br>
/// Build a SymbolAliasMap for the common case where you want to re-export<br>
@@ -416,14 +411,13 @@ public:<br>
/// Create a reexports generator. If an Allow predicate is passed, only<br>
/// symbols for which the predicate returns true will be reexported. If no<br>
/// Allow predicate is passed, all symbols will be exported.<br>
- ReexportsGenerator(JITDylib &SourceJD, bool MatchNonExported = false,<br>
+ ReexportsGenerator(JITDylib &SourceJD,<br>
SymbolPredicate Allow = SymbolPredicate());<br>
<br>
SymbolNameSet operator()(JITDylib &JD, const SymbolNameSet &Names);<br>
<br>
private:<br>
JITDylib &SourceJD;<br>
- bool MatchNonExported = false;<br>
SymbolPredicate Allow;<br>
};<br>
<br>
@@ -542,18 +536,16 @@ public:<br>
/// as the first in the search order (instead of this dylib) ensures that<br>
/// definitions within this dylib resolve to the lazy-compiling stubs,<br>
/// rather than immediately materializing the definitions in this dylib.<br>
- void setSearchOrder(JITDylibSearchList NewSearchOrder,<br>
- bool SearchThisJITDylibFirst = true,<br>
- bool MatchNonExportedInThisDylib = true);<br>
+ void setSearchOrder(JITDylibList NewSearchOrder,<br>
+ bool SearchThisJITDylibFirst = true);<br>
<br>
/// Add the given JITDylib to the search order for definitions in this<br>
/// JITDylib.<br>
- void addToSearchOrder(JITDylib &JD, bool MatcNonExported = false);<br>
+ void addToSearchOrder(JITDylib &JD);<br>
<br>
/// Replace OldJD with NewJD in the search order if OldJD is present.<br>
/// Otherwise this operation is a no-op.<br>
- void replaceInSearchOrder(JITDylib &OldJD, JITDylib &NewJD,<br>
- bool MatchNonExported = false);<br>
+ void replaceInSearchOrder(JITDylib &OldJD, JITDylib &NewJD);<br>
<br>
/// Remove the given JITDylib from the search order for this JITDylib if it is<br>
/// present. Otherwise this operation is a no-op.<br>
@@ -562,7 +554,7 @@ public:<br>
/// Do something with the search order (run under the session lock).<br>
template <typename Func><br>
auto withSearchOrderDo(Func &&F)<br>
- -> decltype(F(std::declval<const JITDylibSearchList &>()));<br>
+ -> decltype(F(std::declval<const JITDylibList &>()));<br>
<br>
/// Define all symbols provided by the materialization unit to be part of this<br>
/// JITDylib.<br>
@@ -650,12 +642,12 @@ private:<br>
const SymbolNameSet &Names);<br>
<br>
void lodgeQuery(std::shared_ptr<AsynchronousSymbolQuery> &Q,<br>
- SymbolNameSet &Unresolved, bool MatchNonExported,<br>
- MaterializationUnitList &MUs);<br>
+ SymbolNameSet &Unresolved, JITDylib *MatchNonExportedInJD,<br>
+ bool MatchNonExported, MaterializationUnitList &MUs);<br>
<br>
void lodgeQueryImpl(std::shared_ptr<AsynchronousSymbolQuery> &Q,<br>
- SymbolNameSet &Unresolved, bool MatchNonExported,<br>
- MaterializationUnitList &MUs);<br>
+ SymbolNameSet &Unresolved, JITDylib *MatchNonExportedInJD,<br>
+ bool MatchNonExported, MaterializationUnitList &MUs);<br>
<br>
LookupImplActionFlags<br>
lookupImpl(std::shared_ptr<AsynchronousSymbolQuery> &Q,<br>
@@ -690,7 +682,7 @@ private:<br>
UnmaterializedInfosMap UnmaterializedInfos;<br>
MaterializingInfosMap MaterializingInfos;<br>
GeneratorFunction DefGenerator;<br>
- JITDylibSearchList SearchOrder;<br>
+ JITDylibList SearchOrder;<br>
};<br>
<br>
/// An ExecutionSession represents a running JIT program.<br>
@@ -774,10 +766,6 @@ public:<br>
<br>
/// Search the given JITDylib list for the given symbols.<br>
///<br>
- /// SearchOrder lists the JITDylibs to search. For each dylib, the associated<br>
- /// boolean indicates whether the search should match against non-exported<br>
- /// (hidden visibility) symbols in that dylib (true means match against<br>
- /// non-exported symbols, false means do not match).<br>
///<br>
/// The OnResolve callback will be called once all requested symbols are<br>
/// resolved, or if an error occurs prior to resolution.<br>
@@ -794,9 +782,19 @@ public:<br>
/// dependenant symbols for this query (e.g. it is being made by a top level<br>
/// client to get an address to call) then the value NoDependenciesToRegister<br>
/// can be used.<br>
- void lookup(const JITDylibSearchList &SearchOrder, SymbolNameSet Symbols,<br>
+ ///<br>
+ /// If the MatchNonExportedInJD pointer is non-null, then the lookup will find<br>
+ /// non-exported symbols defined in the JITDylib pointed to by<br>
+ /// MatchNonExportedInJD.<br>
+ /// If MatchNonExported is true the lookup will find non-exported symbols in<br>
+ /// any JITDylib (setting MatchNonExportedInJD is redundant in such cases).<br>
+ /// If MatchNonExported is false and MatchNonExportedInJD is null,<br>
+ /// non-exported symbols will never be found.<br>
+ void lookup(const JITDylibList &JDs, SymbolNameSet Symbols,<br>
SymbolsResolvedCallback OnResolve, SymbolsReadyCallback OnReady,<br>
- RegisterDependenciesFunction RegisterDependencies);<br>
+ RegisterDependenciesFunction RegisterDependencies,<br>
+ JITDylib *MatchNonExportedInJD = nullptr,<br>
+ bool MatchNonExported = false);<br>
<br>
/// Blocking version of lookup above. Returns the resolved symbol map.<br>
/// If WaitUntilReady is true (the default), will not return until all<br>
@@ -805,29 +803,24 @@ public:<br>
/// or an error occurs. If WaitUntilReady is false and an error occurs<br>
/// after resolution, the function will return a success value, but the<br>
/// error will be reported via reportErrors.<br>
- Expected<SymbolMap> lookup(const JITDylibSearchList &SearchOrder,<br>
+ Expected<SymbolMap> lookup(const JITDylibList &JDs,<br>
const SymbolNameSet &Symbols,<br>
RegisterDependenciesFunction RegisterDependencies =<br>
NoDependenciesToRegister,<br>
- bool WaitUntilReady = true);<br>
-<br>
- /// Convenience version of blocking lookup.<br>
- /// Searches each of the JITDylibs in the search order in turn for the given<br>
- /// symbol.<br>
- Expected<JITEvaluatedSymbol> lookup(const JITDylibSearchList &SearchOrder,<br>
- SymbolStringPtr Symbol);<br>
+ bool WaitUntilReady = true,<br>
+ JITDylib *MatchNonExportedInJD = nullptr,<br>
+ bool MatchNonExported = false);<br>
<br>
/// Convenience version of blocking lookup.<br>
- /// Searches each of the JITDylibs in the search order in turn for the given<br>
- /// symbol. The search will not find non-exported symbols.<br>
- Expected<JITEvaluatedSymbol> lookup(ArrayRef<JITDylib *> SearchOrder,<br>
- SymbolStringPtr Symbol);<br>
+ /// Performs a single-symbol lookup.<br>
+ Expected<JITEvaluatedSymbol> lookup(const JITDylibList &JDs,<br>
+ SymbolStringPtr Symbol,<br>
+ bool MatchNonExported = false);<br>
<br>
/// Convenience version of blocking lookup.<br>
- /// Searches each of the JITDylibs in the search order in turn for the given<br>
- /// symbol. The search will not find non-exported symbols.<br>
- Expected<JITEvaluatedSymbol> lookup(ArrayRef<JITDylib *> SearchOrder,<br>
- StringRef Symbol);<br>
+ /// Performs a single-symbol lookup, auto-interning the given symbol name.<br>
+ Expected<JITEvaluatedSymbol> lookup(const JITDylibList &JDs, StringRef Symbol,<br>
+ bool MatchNonExported = false);<br>
<br>
/// Materialize the given unit.<br>
void dispatchMaterialization(JITDylib &JD,<br>
@@ -873,7 +866,7 @@ private:<br>
<br>
template <typename Func><br>
auto JITDylib::withSearchOrderDo(Func &&F)<br>
- -> decltype(F(std::declval<const JITDylibSearchList &>())) {<br>
+ -> decltype(F(std::declval<const JITDylibList &>())) {<br>
return ES.runSessionLocked([&]() { return F(SearchOrder); });<br>
}<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/LLJIT.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/LLJIT.h?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/LLJIT.h?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/LLJIT.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/LLJIT.h Tue Oct 23 13:54:43 2018<br>
@@ -144,7 +144,7 @@ public:<br>
/// LLLazyJIT with the given number of compile threads.<br>
static Expected<std::unique_ptr<LLLazyJIT>><br>
Create(JITTargetMachineBuilder JTMB, DataLayout DL,<br>
- JITTargetAddress ErrorAddr, unsigned NumCompileThreads = 0);<br>
+ unsigned NumCompileThreads = 0);<br>
<br>
/// Set an IR transform (e.g. pass manager pipeline) to run on each function<br>
/// when it is compiled.<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp Tue Oct 23 13:54:43 2018<br>
@@ -157,7 +157,7 @@ void CompileOnDemandLayer::emit(Material<br>
return;<br>
}<br>
<br>
- R.replace(reexports(PDR.getImplDylib(), std::move(NonCallables), true));<br>
+ R.replace(reexports(PDR.getImplDylib(), std::move(NonCallables)));<br>
R.replace(lazyReexports(LCTMgr, PDR.getISManager(), PDR.getImplDylib(),<br>
std::move(Callables)));<br>
}<br>
@@ -166,17 +166,10 @@ CompileOnDemandLayer::PerDylibResources<br>
CompileOnDemandLayer::getPerDylibResources(JITDylib &TargetD) {<br>
auto I = DylibResources.find(&TargetD);<br>
if (I == DylibResources.end()) {<br>
- auto &ImplD = getExecutionSession().createJITDylib(<br>
- TargetD.getName() + ".impl", false);<br>
- TargetD.withSearchOrderDo([&](const JITDylibSearchList &TargetSearchOrder) {<br>
- auto NewSearchOrder = TargetSearchOrder;<br>
- assert(!NewSearchOrder.empty() &&<br>
- NewSearchOrder.front().first == &TargetD &&<br>
- NewSearchOrder.front().second == true &&<br>
- "TargetD must be at the front of its own search order and match "<br>
- "non-exported symbol");<br>
- NewSearchOrder.insert(std::next(NewSearchOrder.begin()), {&ImplD, true});<br>
- ImplD.setSearchOrder(std::move(NewSearchOrder), false);<br>
+ auto &ImplD =<br>
+ getExecutionSession().createJITDylib(TargetD.getName() + ".impl");<br>
+ TargetD.withSearchOrderDo([&](const JITDylibList &TargetSearchOrder) {<br>
+ ImplD.setSearchOrder(TargetSearchOrder, false);<br>
});<br>
PerDylibResources PDR(ImplD, BuildIndirectStubsManager());<br>
I = DylibResources.insert(std::make_pair(&TargetD, std::move(PDR))).first;<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp Tue Oct 23 13:54:43 2018<br>
@@ -205,16 +205,14 @@ raw_ostream &operator<<(raw_ostream &OS,<br>
return OS << ")";<br>
}<br>
<br>
-raw_ostream &operator<<(raw_ostream &OS, const JITDylibSearchList &JDs) {<br>
+raw_ostream &operator<<(raw_ostream &OS, const JITDylibList &JDs) {<br>
OS << "[";<br>
if (!JDs.empty()) {<br>
- assert(JDs.front().first && "JITDylibList entries must not be null");<br>
- OS << " (\"" << JDs.front().first->getName() << "\", "<br>
- << (JDs.front().second ? "true" : "false") << ")";<br>
- for (auto &KV : make_range(std::next(JDs.begin()), JDs.end())) {<br>
- assert(KV.first && "JITDylibList entries must not be null");<br>
- OS << ", (\"" << KV.first->getName() << "\", "<br>
- << (KV.second ? "true" : "false") << ")";<br>
+ assert(JDs.front() && "JITDylibList entries must not be null");<br>
+ OS << " " << JDs.front()->getName();<br>
+ for (auto *JD : make_range(std::next(JDs.begin()), JDs.end())) {<br>
+ assert(JD && "JITDylibList entries must not be null");<br>
+ OS << ", " << JD->getName();<br>
}<br>
}<br>
OS << " ]";<br>
@@ -528,11 +526,9 @@ AbsoluteSymbolsMaterializationUnit::extr<br>
}<br>
<br>
ReExportsMaterializationUnit::ReExportsMaterializationUnit(<br>
- JITDylib *SourceJD, bool MatchNonExported, SymbolAliasMap Aliases,<br>
- VModuleKey K)<br>
+ JITDylib *SourceJD, SymbolAliasMap Aliases, VModuleKey K)<br>
: MaterializationUnit(extractFlags(Aliases), std::move(K)),<br>
- SourceJD(SourceJD), MatchNonExported(MatchNonExported),<br>
- Aliases(std::move(Aliases)) {}<br>
+ SourceJD(SourceJD), Aliases(std::move(Aliases)) {}<br>
<br>
StringRef ReExportsMaterializationUnit::getName() const {<br>
return "<Reexports>";<br>
@@ -560,7 +556,7 @@ void ReExportsMaterializationUnit::mater<br>
<br>
if (!Aliases.empty()) {<br>
if (SourceJD)<br>
- R.replace(reexports(*SourceJD, std::move(Aliases), MatchNonExported));<br>
+ R.replace(reexports(*SourceJD, std::move(Aliases)));<br>
else<br>
R.replace(symbolAliases(std::move(Aliases)));<br>
}<br>
@@ -660,8 +656,8 @@ void ReExportsMaterializationUnit::mater<br>
<br>
auto OnReady = [&ES](Error Err) { ES.reportError(std::move(Err)); };<br>
<br>
- ES.lookup({{&SrcJD, MatchNonExported}}, QuerySymbols, std::move(OnResolve),<br>
- std::move(OnReady), std::move(RegisterDependencies));<br>
+ ES.lookup({&SrcJD}, QuerySymbols, std::move(OnResolve), std::move(OnReady),<br>
+ std::move(RegisterDependencies), nullptr, true);<br>
}<br>
}<br>
<br>
@@ -702,10 +698,8 @@ buildSimpleReexportsAliasMap(JITDylib &S<br>
}<br>
<br>
ReexportsGenerator::ReexportsGenerator(JITDylib &SourceJD,<br>
- bool MatchNonExported,<br>
SymbolPredicate Allow)<br>
- : SourceJD(SourceJD), MatchNonExported(MatchNonExported),<br>
- Allow(std::move(Allow)) {}<br>
+ : SourceJD(SourceJD), Allow(std::move(Allow)) {}<br>
<br>
SymbolNameSet ReexportsGenerator::operator()(JITDylib &JD,<br>
const SymbolNameSet &Names) {<br>
@@ -722,7 +716,7 @@ SymbolNameSet ReexportsGenerator::operat<br>
}<br>
<br>
if (!Added.empty())<br>
- cantFail(JD.define(reexports(SourceJD, AliasMap, MatchNonExported)));<br>
+ cantFail(JD.define(reexports(SourceJD, AliasMap)));<br>
<br>
return Added;<br>
}<br>
@@ -1047,41 +1041,30 @@ void JITDylib::notifyFailed(const Symbol<br>
Q->handleFailed(make_error<FailedToMaterialize>(FailedSymbols));<br>
}<br>
<br>
-void JITDylib::setSearchOrder(JITDylibSearchList NewSearchOrder,<br>
- bool SearchThisJITDylibFirst,<br>
- bool MatchNonExportedInThisDylib) {<br>
- if (SearchThisJITDylibFirst && NewSearchOrder.front().first != this)<br>
- NewSearchOrder.insert(NewSearchOrder.begin(),<br>
- {this, MatchNonExportedInThisDylib});<br>
+void JITDylib::setSearchOrder(JITDylibList NewSearchOrder,<br>
+ bool SearchThisJITDylibFirst) {<br>
+ if (SearchThisJITDylibFirst && NewSearchOrder.front() != this)<br>
+ NewSearchOrder.insert(NewSearchOrder.begin(), this);<br>
<br>
ES.runSessionLocked([&]() { SearchOrder = std::move(NewSearchOrder); });<br>
}<br>
<br>
-void JITDylib::addToSearchOrder(JITDylib &JD, bool MatchNonExported) {<br>
- ES.runSessionLocked([&]() {<br>
- SearchOrder.push_back({&JD, MatchNonExported});<br>
- });<br>
+void JITDylib::addToSearchOrder(JITDylib &JD) {<br>
+ ES.runSessionLocked([&]() { SearchOrder.push_back(&JD); });<br>
}<br>
<br>
-void JITDylib::replaceInSearchOrder(JITDylib &OldJD, JITDylib &NewJD,<br>
- bool MatchNonExported) {<br>
+void JITDylib::replaceInSearchOrder(JITDylib &OldJD, JITDylib &NewJD) {<br>
ES.runSessionLocked([&]() {<br>
- auto I = std::find_if(SearchOrder.begin(), SearchOrder.end(),<br>
- [&](const JITDylibSearchList::value_type &KV) {<br>
- return KV.first == &OldJD;<br>
- });<br>
+ auto I = std::find(SearchOrder.begin(), SearchOrder.end(), &OldJD);<br>
<br>
if (I != SearchOrder.end())<br>
- *I = {&NewJD, MatchNonExported};<br>
+ *I = &NewJD;<br>
});<br>
}<br>
<br>
void JITDylib::removeFromSearchOrder(JITDylib &JD) {<br>
ES.runSessionLocked([&]() {<br>
- auto I = std::find_if(SearchOrder.begin(), SearchOrder.end(),<br>
- [&](const JITDylibSearchList::value_type &KV) {<br>
- return KV.first == &JD;<br>
- });<br>
+ auto I = std::find(SearchOrder.begin(), SearchOrder.end(), &JD);<br>
if (I != SearchOrder.end())<br>
SearchOrder.erase(I);<br>
});<br>
@@ -1178,17 +1161,18 @@ SymbolNameSet JITDylib::lookupFlagsImpl(<br>
}<br>
<br>
void JITDylib::lodgeQuery(std::shared_ptr<AsynchronousSymbolQuery> &Q,<br>
- SymbolNameSet &Unresolved, bool MatchNonExported,<br>
+ SymbolNameSet &Unresolved,<br>
+ JITDylib *MatchNonExportedInJD, bool MatchNonExported,<br>
MaterializationUnitList &MUs) {<br>
assert(Q && "Query can not be null");<br>
<br>
- lodgeQueryImpl(Q, Unresolved, MatchNonExported, MUs);<br>
+ lodgeQueryImpl(Q, Unresolved, MatchNonExportedInJD, MatchNonExported, MUs);<br>
if (DefGenerator && !Unresolved.empty()) {<br>
auto NewDefs = DefGenerator(*this, Unresolved);<br>
if (!NewDefs.empty()) {<br>
for (auto &D : NewDefs)<br>
Unresolved.erase(D);<br>
- lodgeQueryImpl(Q, NewDefs, MatchNonExported, MUs);<br>
+ lodgeQueryImpl(Q, NewDefs, MatchNonExportedInJD, MatchNonExported, MUs);<br>
assert(NewDefs.empty() &&<br>
"All fallback defs should have been found by lookupImpl");<br>
}<br>
@@ -1197,7 +1181,7 @@ void JITDylib::lodgeQuery(std::shared_pt<br>
<br>
void JITDylib::lodgeQueryImpl(<br>
std::shared_ptr<AsynchronousSymbolQuery> &Q, SymbolNameSet &Unresolved,<br>
- bool MatchNonExported,<br>
+ JITDylib *MatchNonExportedInJD, bool MatchNonExported,<br>
std::vector<std::unique_ptr<MaterializationUnit>> &MUs) {<br>
<br>
std::vector<SymbolStringPtr> ToRemove;<br>
@@ -1207,9 +1191,12 @@ void JITDylib::lodgeQueryImpl(<br>
if (SymI == Symbols.end())<br>
continue;<br>
<br>
- // If this is a non exported symbol and we're skipping those then skip it.<br>
- if (!SymI->second.getFlags().isExported() && !MatchNonExported)<br>
- continue;<br>
+ // If this is a non-exported symbol, then check the values of<br>
+ // MatchNonExportedInJD and MatchNonExported. Skip if we should not match<br>
+ // against this symbol.<br>
+ if (!SymI->second.getFlags().isExported())<br>
+ if (!MatchNonExported && MatchNonExportedInJD != this)<br>
+ continue;<br>
<br>
// If we matched against Name in JD, mark it to be removed from the Unresolved<br>
// set.<br>
@@ -1395,9 +1382,8 @@ void JITDylib::dump(raw_ostream &OS) {<br>
<< "\" (ES: " << format("0x%016x", reinterpret_cast<uintptr_t>(&ES))<br>
<< "):\n"<br>
<< "Search order: [";<br>
- for (auto &KV : SearchOrder)<br>
- OS << " (\"" << KV.first->getName() << "\", "<br>
- << (KV.second ? "all" : "exported only") << ")";<br>
+ for (auto *JD : SearchOrder)<br>
+ OS << " \"" << JD->getName() << "\"";<br>
OS << " ]\n"<br>
<< "Symbol table:\n";<br>
<br>
@@ -1445,7 +1431,7 @@ void JITDylib::dump(raw_ostream &OS) {<br>
<br>
JITDylib::JITDylib(ExecutionSession &ES, std::string Name)<br>
: ES(ES), JITDylibName(std::move(Name)) {<br>
- SearchOrder.push_back({this, true});<br>
+ SearchOrder.push_back(this);<br>
}<br>
<br>
Error JITDylib::defineImpl(MaterializationUnit &MU) {<br>
@@ -1738,10 +1724,12 @@ Expected<SymbolMap> ExecutionSession::le<br>
#endif<br>
}<br>
<br>
-void ExecutionSession::lookup(<br>
- const JITDylibSearchList &SearchOrder, SymbolNameSet Symbols,<br>
- SymbolsResolvedCallback OnResolve, SymbolsReadyCallback OnReady,<br>
- RegisterDependenciesFunction RegisterDependencies) {<br>
+void ExecutionSession::lookup(const JITDylibList &JDs, SymbolNameSet Symbols,<br>
+ SymbolsResolvedCallback OnResolve,<br>
+ SymbolsReadyCallback OnReady,<br>
+ RegisterDependenciesFunction RegisterDependencies,<br>
+ JITDylib *MatchNonExportedInJD,<br>
+ bool MatchNonExported) {<br>
<br>
// lookup can be re-entered recursively if running on a single thread. Run any<br>
// outstanding MUs in case this query depends on them, otherwise this lookup<br>
@@ -1757,14 +1745,12 @@ void ExecutionSession::lookup(<br>
bool QueryFailed = false;<br>
<br>
runSessionLocked([&]() {<br>
- for (auto &KV : SearchOrder) {<br>
- assert(KV.first && "JITDylibList entries must not be null");<br>
- assert(!CollectedMUsMap.count(KV.first) &&<br>
+ for (auto *JD : JDs) {<br>
+ assert(JD && "JITDylibList entries must not be null");<br>
+ assert(!CollectedMUsMap.count(JD) &&<br>
"JITDylibList should not contain duplicate entries");<br>
-<br>
- auto &JD = *KV.first;<br>
- auto MatchNonExported = KV.second;<br>
- JD.lodgeQuery(Q, Unresolved, MatchNonExported, CollectedMUsMap[&JD]);<br>
+ JD->lodgeQuery(Q, Unresolved, MatchNonExportedInJD, MatchNonExported,<br>
+ CollectedMUsMap[JD]);<br>
}<br>
<br>
if (Unresolved.empty()) {<br>
@@ -1815,9 +1801,11 @@ void ExecutionSession::lookup(<br>
runOutstandingMUs();<br>
}<br>
<br>
-Expected<SymbolMap> ExecutionSession::lookup(<br>
- const JITDylibSearchList &SearchOrder, const SymbolNameSet &Symbols,<br>
- RegisterDependenciesFunction RegisterDependencies, bool WaitUntilReady) {<br>
+Expected<SymbolMap><br>
+ExecutionSession::lookup(const JITDylibList &JDs, const SymbolNameSet &Symbols,<br>
+ RegisterDependenciesFunction RegisterDependencies,<br>
+ bool WaitUntilReady, JITDylib *MatchNonExportedInJD,<br>
+ bool MatchNonExported) {<br>
#if LLVM_ENABLE_THREADS<br>
// In the threaded case we use promises to return the results.<br>
std::promise<SymbolMap> PromisedResult;<br>
@@ -1884,7 +1872,8 @@ Expected<SymbolMap> ExecutionSession::lo<br>
#endif<br>
<br>
// Perform the asynchronous lookup.<br>
- lookup(SearchOrder, Symbols, OnResolve, OnReady, RegisterDependencies);<br>
+ lookup(JDs, Symbols, OnResolve, OnReady, RegisterDependencies,<br>
+ MatchNonExportedInJD, MatchNonExported);<br>
<br>
#if LLVM_ENABLE_THREADS<br>
auto ResultFuture = PromisedResult.get_future();<br>
@@ -1927,13 +1916,14 @@ Expected<SymbolMap> ExecutionSession::lo<br>
#endif<br>
}<br>
<br>
-Expected<JITEvaluatedSymbol><br>
-ExecutionSession::lookup(const JITDylibSearchList &SearchOrder,<br>
- SymbolStringPtr Name) {<br>
+/// Look up a symbol by searching a list of JDs.<br>
+Expected<JITEvaluatedSymbol> ExecutionSession::lookup(const JITDylibList &JDs,<br>
+ SymbolStringPtr Name,<br>
+ bool MatchNonExported) {<br>
SymbolNameSet Names({Name});<br>
<br>
- if (auto ResultMap = lookup(SearchOrder, std::move(Names),<br>
- NoDependenciesToRegister, true)) {<br>
+ if (auto ResultMap = lookup(JDs, std::move(Names), NoDependenciesToRegister,<br>
+ true, nullptr, MatchNonExported)) {<br>
assert(ResultMap->size() == 1 && "Unexpected number of results");<br>
assert(ResultMap->count(Name) && "Missing result for symbol");<br>
return std::move(ResultMap->begin()->second);<br>
@@ -1941,21 +1931,10 @@ ExecutionSession::lookup(const JITDylibS<br>
return ResultMap.takeError();<br>
}<br>
<br>
-Expected<JITEvaluatedSymbol><br>
-ExecutionSession::lookup(ArrayRef<JITDylib *> SearchOrder,<br>
- SymbolStringPtr Name) {<br>
- SymbolNameSet Names({Name});<br>
-<br>
- JITDylibSearchList FullSearchOrder(SearchOrder.size());<br>
- for (auto *JD : SearchOrder)<br>
- FullSearchOrder.push_back({JD, false});<br>
-<br>
- return lookup(FullSearchOrder, Name);<br>
-}<br>
-<br>
-Expected<JITEvaluatedSymbol><br>
-ExecutionSession::lookup(ArrayRef<JITDylib *> SearchOrder, StringRef Name) {<br>
- return lookup(SearchOrder, intern(Name));<br>
+Expected<JITEvaluatedSymbol> ExecutionSession::lookup(const JITDylibList &JDs,<br>
+ StringRef Name,<br>
+ bool MatchNonExported) {<br>
+ return lookup(JDs, intern(Name), MatchNonExported);<br>
}<br>
<br>
void ExecutionSession::dump(raw_ostream &OS) {<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/ExecutionUtils.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/ExecutionUtils.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/ExecutionUtils.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/ExecutionUtils.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/ExecutionUtils.cpp Tue Oct 23 13:54:43 2018<br>
@@ -129,8 +129,9 @@ Error CtorDtorRunner::run() {<br>
}<br>
<br>
auto &ES = JD.getExecutionSession();<br>
- if (auto CtorDtorMap = ES.lookup({{&JD, true}}, std::move(Names),<br>
- NoDependenciesToRegister, true)) {<br>
+ if (auto CtorDtorMap =<br>
+ ES.lookup({&JD}, std::move(Names), NoDependenciesToRegister, true,<br>
+ nullptr, true)) {<br>
for (auto &KV : CtorDtorsByPriority) {<br>
for (auto &Name : KV.second) {<br>
assert(CtorDtorMap->count(Name) && "No entry for Name");<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/IndirectionUtils.cpp Tue Oct 23 13:54:43 2018<br>
@@ -101,7 +101,7 @@ JITTargetAddress JITCompileCallbackManag<br>
Name = I->second;<br>
}<br>
<br>
- if (auto Sym = ES.lookup({{&CallbacksJD, true}}, Name))<br>
+ if (auto Sym = ES.lookup({&CallbacksJD}, Name, true))<br>
return Sym->getAddress();<br>
else {<br>
llvm::dbgs() << "Didn't find callback.\n";<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/LLJIT.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/LLJIT.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/LLJIT.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/LLJIT.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/LLJIT.cpp Tue Oct 23 13:54:43 2018<br>
@@ -76,7 +76,7 @@ Error LLJIT::addObjectFile(JITDylib &JD,<br>
<br>
Expected<JITEvaluatedSymbol> LLJIT::lookupLinkerMangled(JITDylib &JD,<br>
StringRef Name) {<br>
- return ES->lookup({{&JD, true}}, ES->intern(Name));<br>
+ return ES->lookup({&JD}, ES->intern(Name));<br>
}<br>
<br>
LLJIT::LLJIT(std::unique_ptr<ExecutionSession> ES,<br>
@@ -144,13 +144,13 @@ void LLJIT::recordCtorDtors(Module &M) {<br>
}<br>
<br>
Expected<std::unique_ptr<LLLazyJIT>><br>
-LLLazyJIT::Create(JITTargetMachineBuilder JTMB, DataLayout DL,<br>
- JITTargetAddress ErrorAddr, unsigned NumCompileThreads) {<br>
+ LLLazyJIT::Create(JITTargetMachineBuilder JTMB, DataLayout DL,<br>
+ unsigned NumCompileThreads) {<br>
auto ES = llvm::make_unique<ExecutionSession>();<br>
<br>
const Triple &TT = JTMB.getTargetTriple();<br>
<br>
- auto LCTMgr = createLocalLazyCallThroughManager(TT, *ES, ErrorAddr);<br>
+ auto LCTMgr = createLocalLazyCallThroughManager(TT, *ES, 0);<br>
if (!LCTMgr)<br>
return LCTMgr.takeError();<br>
<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/LazyReexports.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/LazyReexports.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/LazyReexports.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/LazyReexports.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/LazyReexports.cpp Tue Oct 23 13:54:43 2018<br>
@@ -52,8 +52,8 @@ LazyCallThroughManager::callThroughToSym<br>
SymbolName = I->second.second;<br>
}<br>
<br>
- auto LookupResult = ES.lookup({{SourceJD, true}}, {SymbolName},<br>
- NoDependenciesToRegister, true);<br>
+ auto LookupResult = ES.lookup({SourceJD}, {SymbolName},<br>
+ NoDependenciesToRegister, true, nullptr, true);<br>
<br>
if (!LookupResult) {<br>
ES.reportError(LookupResult.takeError());<br>
<br>
Modified: llvm/trunk/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp (original)<br>
+++ llvm/trunk/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp Tue Oct 23 13:54:43 2018<br>
@@ -50,11 +50,10 @@ public:<br>
MR.addDependenciesForAll(Deps);<br>
};<br>
<br>
- JITDylibSearchList SearchOrder;<br>
- MR.getTargetJITDylib().withSearchOrderDo(<br>
- [&](const JITDylibSearchList &JDs) { SearchOrder = JDs; });<br>
- ES.lookup(SearchOrder, InternedSymbols, OnResolvedWithUnwrap, OnReady,<br>
- RegisterDependencies);<br>
+ MR.getTargetJITDylib().withSearchOrderDo([&](const JITDylibList &JDs) {<br>
+ ES.lookup(JDs, InternedSymbols, OnResolvedWithUnwrap, OnReady,<br>
+ RegisterDependencies, &MR.getTargetJITDylib());<br>
+ });<br>
}<br>
<br>
Expected<LookupSet> getResponsibilitySet(const LookupSet &Symbols) {<br>
<br>
Removed: llvm/trunk/test/ExecutionEngine/OrcLazy/Inputs/hidden-definitions.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/OrcLazy/Inputs/hidden-definitions.ll?rev=345077&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/OrcLazy/Inputs/hidden-definitions.ll?rev=345077&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/test/ExecutionEngine/OrcLazy/Inputs/hidden-definitions.ll (original)<br>
+++ llvm/trunk/test/ExecutionEngine/OrcLazy/Inputs/hidden-definitions.ll (removed)<br>
@@ -1,6 +0,0 @@<br>
-@bar = hidden global i32 0<br>
-<br>
-define hidden i32 @foo() {<br>
-entry:<br>
- ret i32 0<br>
-}<br>
<br>
Removed: llvm/trunk/test/ExecutionEngine/OrcLazy/hidden-visibility.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/OrcLazy/hidden-visibility.ll?rev=345077&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/OrcLazy/hidden-visibility.ll?rev=345077&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/test/ExecutionEngine/OrcLazy/hidden-visibility.ll (original)<br>
+++ llvm/trunk/test/ExecutionEngine/OrcLazy/hidden-visibility.ll (removed)<br>
@@ -1,17 +0,0 @@<br>
-; RUN: lli -jit-kind=orc-lazy -extra-module %p/Inputs/hidden-definitions.ll %s<br>
-; RUN: not lli -jit-kind=orc-lazy -jd libFoo -extra-module %p/Inputs/hidden-definitions.ll %s<br>
-;<br>
-; Check that hidden symbols in another module are visible when the module is<br>
-; added to the same JITDylib, and not visible if it is added to a different<br>
-; JITDylib.<br>
-<br>
-@bar = external global i32<br>
-declare i32 @foo()<br>
-<br>
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) {<br>
-entry:<br>
- %0 = call i32() @foo()<br>
- %1 = load i32, i32* @bar<br>
- %2 = add i32 %0, %1<br>
- ret i32 %2<br>
-}<br>
<br>
Modified: llvm/trunk/tools/lli/lli.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/tools/lli/lli.cpp (original)<br>
+++ llvm/trunk/tools/lli/lli.cpp Tue Oct 23 13:54:43 2018<br>
@@ -115,11 +115,6 @@ namespace {<br>
"rather than individual functions"),<br>
cl::init(false));<br>
<br>
- cl::list<std::string><br>
- JITDylibs("jd",<br>
- cl::desc("Specifies the JITDylib to be used for any subsequent "<br>
- "-extra-module arguments."));<br>
-<br>
// The MCJIT supports building for a target address space separate from<br>
// the JIT compilation process. Use a forked process and a copying<br>
// memory manager with IPC to execute using this functionality.<br>
@@ -754,8 +749,6 @@ static orc::IRTransformLayer::TransformF<br>
llvm_unreachable("Unknown DumpKind");<br>
}<br>
<br>
-static void exitOnLazyCallThroughFailure() { exit(1); }<br>
-<br>
int runOrcLazyJIT(const char *ProgName) {<br>
// Start setting up the JIT environment.<br>
<br>
@@ -785,11 +778,7 @@ int runOrcLazyJIT(const char *ProgName)<br>
: None);<br>
<br>
DataLayout DL = ExitOnErr(JTMB.getDefaultDataLayoutForTarget());<br>
-<br>
- auto J = ExitOnErr(orc::LLLazyJIT::Create(<br>
- std::move(JTMB), DL,<br>
- pointerToJITTargetAddress(exitOnLazyCallThroughFailure),<br>
- LazyJITCompileThreads));<br>
+ auto J = ExitOnErr(orc::LLLazyJIT::Create(std::move(JTMB), DL, LazyJITCompileThreads));<br>
<br>
if (PerModuleLazy)<br>
J->setPartitionFunction(orc::CompileOnDemandLayer::compileWholeModule);<br>
@@ -814,32 +803,13 @@ int runOrcLazyJIT(const char *ProgName)<br>
// Add the main module.<br>
ExitOnErr(J->addLazyIRModule(std::move(MainModule)));<br>
<br>
- // Create JITDylibs and add any extra modules.<br>
- {<br>
- // Create JITDylibs, keep a map from argument index to dylib. We will use<br>
- // -extra-module argument indexes to determine what dylib to use for each<br>
- // -extra-module.<br>
- std::map<unsigned, orc::JITDylib *> IdxToDylib;<br>
- IdxToDylib[0] = &J->getMainJITDylib();<br>
- for (auto JDItr = JITDylibs.begin(), JDEnd = JITDylibs.end();<br>
- JDItr != JDEnd; ++JDItr) {<br>
- IdxToDylib[JITDylibs.getPosition(JDItr - JITDylibs.begin())] =<br>
- &J->createJITDylib(*JDItr);<br>
- }<br>
+ // Add any extra modules.<br>
+ for (auto &ModulePath : ExtraModules) {<br>
+ auto M = parseIRFile(ModulePath, Err, *TSCtx.getContext());<br>
+ if (!M)<br>
+ reportError(Err, ProgName);<br>
<br>
- for (auto EMItr = ExtraModules.begin(), EMEnd = ExtraModules.end();<br>
- EMItr != EMEnd; ++EMItr) {<br>
- auto M = parseIRFile(*EMItr, Err, *TSCtx.getContext());<br>
- if (!M)<br>
- reportError(Err, ProgName);<br>
-<br>
- auto EMIdx = ExtraModules.getPosition(EMItr - ExtraModules.begin());<br>
- assert(EMIdx != 0 && "ExtraModule should have index > 0");<br>
- auto JDItr = std::prev(IdxToDylib.lower_bound(EMIdx));<br>
- auto &JD = *JDItr->second;<br>
- ExitOnErr(<br>
- J->addLazyIRModule(JD, orc::ThreadSafeModule(std::move(M), TSCtx)));<br>
- }<br>
+ ExitOnErr(J->addLazyIRModule(orc::ThreadSafeModule(std::move(M), TSCtx)));<br>
}<br>
<br>
// Add the objects.<br>
@@ -867,8 +837,6 @@ int runOrcLazyJIT(const char *ProgName)<br>
AltEntryThreads.push_back(std::thread([EntryPoint]() { EntryPoint(); }));<br>
}<br>
<br>
- J->getExecutionSession().dump(llvm::dbgs());<br>
-<br>
// Run main.<br>
auto MainSym = ExitOnErr(J->lookup("main"));<br>
typedef int (*MainFnPtr)(int, const char *[]);<br>
<br>
Modified: llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp (original)<br>
+++ llvm/trunk/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp Tue Oct 23 13:54:43 2018<br>
@@ -48,8 +48,7 @@ TEST_F(CoreAPIsStandardTest, BasicSucces<br>
FooMR = std::make_shared<MaterializationResponsibility>(std::move(R));<br>
})));<br>
<br>
- ES.lookup({{&JD, false}}, {Foo}, OnResolution, OnReady,<br>
- NoDependenciesToRegister);<br>
+ ES.lookup({&JD}, {Foo}, OnResolution, OnReady, NoDependenciesToRegister);<br>
<br>
EXPECT_FALSE(OnResolutionRun) << "Should not have been resolved yet";<br>
EXPECT_FALSE(OnReadyRun) << "Should not have been marked ready yet";<br>
@@ -102,8 +101,7 @@ TEST_F(CoreAPIsStandardTest, EmptyLookup<br>
OnReadyRun = true;<br>
};<br>
<br>
- ES.lookup({{&JD, false}}, {}, OnResolution, OnReady,<br>
- NoDependenciesToRegister);<br>
+ ES.lookup({&JD}, {}, OnResolution, OnReady, NoDependenciesToRegister);<br>
<br>
EXPECT_TRUE(OnResolvedRun) << "OnResolved was not run for empty query";<br>
EXPECT_TRUE(OnReadyRun) << "OnReady was not run for empty query";<br>
@@ -150,7 +148,7 @@ TEST_F(CoreAPIsStandardTest, RemoveSymbo<br>
<br>
bool OnResolvedRun = false;<br>
bool OnReadyRun = false;<br>
- ES.lookup({{&JD, false}}, {Foo, Baz},<br>
+ ES.lookup({&JD}, {Foo, Baz},<br>
[&](Expected<SymbolMap> Result) {<br>
EXPECT_TRUE(!!Result) << "OnResolved failed unexpectedly";<br>
consumeError(Result.takeError());<br>
@@ -231,8 +229,7 @@ TEST_F(CoreAPIsStandardTest, LookupWithH<br>
auto &JD2 = ES.createJITDylib("JD2");<br>
cantFail(JD2.define(absoluteSymbols({{Bar, QuxSym}})));<br>
<br>
- /// Try a blocking lookup.<br>
- auto Result = cantFail(ES.lookup({{&JD, false}, {&JD2, false}}, {Foo, Bar}));<br>
+ auto Result = cantFail(ES.lookup({&JD, &JD2}, {Foo, Bar}));<br>
<br>
EXPECT_EQ(Result.size(), 2U) << "Unexpected number of results";<br>
EXPECT_EQ(Result.count(Foo), 1U) << "Missing result for \"Foo\"";<br>
@@ -278,7 +275,7 @@ TEST_F(CoreAPIsStandardTest, TestBasicAl<br>
{Qux, {Bar, JITSymbolFlags::Weak}}})));<br>
cantFail(JD.define(absoluteSymbols({{Qux, QuxSym}})));<br>
<br>
- auto Result = ES.lookup({{&JD, false}}, {Baz, Qux});<br>
+ auto Result = ES.lookup({&JD}, {Baz, Qux});<br>
EXPECT_TRUE(!!Result) << "Unexpected lookup failure";<br>
EXPECT_EQ(Result->count(Baz), 1U) << "No result for \"baz\"";<br>
EXPECT_EQ(Result->count(Qux), 1U) << "No result for \"qux\"";<br>
@@ -293,7 +290,7 @@ TEST_F(CoreAPIsStandardTest, TestChained<br>
cantFail(JD.define(symbolAliases(<br>
{{Baz, {Bar, BazSym.getFlags()}}, {Bar, {Foo, BarSym.getFlags()}}})));<br>
<br>
- auto Result = ES.lookup({{&JD, false}}, {Bar, Baz});<br>
+ auto Result = ES.lookup({&JD}, {Bar, Baz});<br>
EXPECT_TRUE(!!Result) << "Unexpected lookup failure";<br>
EXPECT_EQ(Result->count(Bar), 1U) << "No result for \"bar\"";<br>
EXPECT_EQ(Result->count(Baz), 1U) << "No result for \"baz\"";<br>
@@ -312,7 +309,7 @@ TEST_F(CoreAPIsStandardTest, TestBasicRe<br>
<br>
cantFail(JD2.define(reexports(JD, {{Bar, {Foo, BarSym.getFlags()}}})));<br>
<br>
- auto Result = cantFail(ES.lookup({{&JD2, false}}, Bar));<br>
+ auto Result = cantFail(ES.lookup({&JD2}, Bar));<br>
EXPECT_EQ(Result.getAddress(), FooSym.getAddress())<br>
<< "Re-export Bar for symbol Foo should match FooSym's address";<br>
}<br>
@@ -338,7 +335,7 @@ TEST_F(CoreAPIsStandardTest, TestThatReE<br>
cantFail(JD2.define(reexports(<br>
JD, {{Baz, {Foo, BazSym.getFlags()}}, {Qux, {Bar, QuxSym.getFlags()}}})));<br>
<br>
- auto Result = cantFail(ES.lookup({{&JD2, false}}, Baz));<br>
+ auto Result = cantFail(ES.lookup({&JD2}, Baz));<br>
EXPECT_EQ(Result.getAddress(), FooSym.getAddress())<br>
<< "Re-export Baz for symbol Foo should match FooSym's address";<br>
<br>
@@ -353,13 +350,13 @@ TEST_F(CoreAPIsStandardTest, TestReexpor<br>
<br>
auto Filter = [this](SymbolStringPtr Name) { return Name != Bar; };<br>
<br>
- JD.setGenerator(ReexportsGenerator(JD2, false, Filter));<br>
+ JD.setGenerator(ReexportsGenerator(JD2, Filter));<br>
<br>
auto Flags = JD.lookupFlags({Foo, Bar, Baz});<br>
EXPECT_EQ(Flags.size(), 1U) << "Unexpected number of results";<br>
EXPECT_EQ(Flags[Foo], FooSym.getFlags()) << "Unexpected flags for Foo";<br>
<br>
- auto Result = cantFail(ES.lookup({{&JD, false}}, Foo));<br>
+ auto Result = cantFail(ES.lookup({&JD}, Foo));<br>
<br>
EXPECT_EQ(Result.getAddress(), FooSym.getAddress())<br>
<< "Incorrect reexported symbol address";<br>
@@ -380,7 +377,7 @@ TEST_F(CoreAPIsStandardTest, TestTrivial<br>
FooReady = true;<br>
};<br>
<br>
- ES.lookup({{&JD, false}}, {Foo}, std::move(OnResolution), std::move(OnReady),<br>
+ ES.lookup({&JD}, {Foo}, std::move(OnResolution), std::move(OnReady),<br>
NoDependenciesToRegister);<br>
<br>
FooR->resolve({{Foo, FooSym}});<br>
@@ -437,8 +434,8 @@ TEST_F(CoreAPIsStandardTest, TestCircula<br>
<br>
// Issue a lookup for Foo. Use NoDependenciesToRegister: We're going to add<br>
// the dependencies manually below.<br>
- ES.lookup({{&JD, false}}, {Foo}, std::move(OnFooResolution),<br>
- std::move(OnFooReady), NoDependenciesToRegister);<br>
+ ES.lookup({&JD}, {Foo}, std::move(OnFooResolution), std::move(OnFooReady),<br>
+ NoDependenciesToRegister);<br>
<br>
bool BarResolved = false;<br>
bool BarReady = false;<br>
@@ -452,8 +449,8 @@ TEST_F(CoreAPIsStandardTest, TestCircula<br>
BarReady = true;<br>
};<br>
<br>
- ES.lookup({{&JD, false}}, {Bar}, std::move(OnBarResolution),<br>
- std::move(OnBarReady), NoDependenciesToRegister);<br>
+ ES.lookup({&JD}, {Bar}, std::move(OnBarResolution), std::move(OnBarReady),<br>
+ NoDependenciesToRegister);<br>
<br>
bool BazResolved = false;<br>
bool BazReady = false;<br>
@@ -468,8 +465,8 @@ TEST_F(CoreAPIsStandardTest, TestCircula<br>
BazReady = true;<br>
};<br>
<br>
- ES.lookup({{&JD, false}}, {Baz}, std::move(OnBazResolution),<br>
- std::move(OnBazReady), NoDependenciesToRegister);<br>
+ ES.lookup({&JD}, {Baz}, std::move(OnBazResolution), std::move(OnBazReady),<br>
+ NoDependenciesToRegister);<br>
<br>
// Add a circular dependency: Foo -> Bar, Bar -> Baz, Baz -> Foo.<br>
FooR->addDependenciesForAll({{&JD, SymbolNameSet({Bar})}});<br>
@@ -591,7 +588,7 @@ TEST_F(CoreAPIsStandardTest, AddAndMater<br>
OnReadyRun = true;<br>
};<br>
<br>
- ES.lookup({{&JD, false}}, Names, std::move(OnResolution), std::move(OnReady),<br>
+ ES.lookup({&JD}, Names, std::move(OnResolution), std::move(OnReady),<br>
NoDependenciesToRegister);<br>
<br>
EXPECT_TRUE(FooMaterialized) << "Foo was not materialized";<br>
@@ -640,7 +637,7 @@ TEST_F(CoreAPIsStandardTest, TestBasicWe<br>
OnReadyRun = true;<br>
};<br>
<br>
- ES.lookup({{&JD, false}}, {Bar}, std::move(OnResolution), std::move(OnReady),<br>
+ ES.lookup({&JD}, {Bar}, std::move(OnResolution), std::move(OnReady),<br>
NoDependenciesToRegister);<br>
<br>
EXPECT_TRUE(OnResolvedRun) << "OnResolved not run";<br>
@@ -669,13 +666,13 @@ TEST_F(CoreAPIsStandardTest, DefineMater<br>
});<br>
<br>
cantFail(JD.define(MU));<br>
- cantFail(ES.lookup({{&JD, false}}, Foo));<br>
+ cantFail(ES.lookup({&JD}, Foo));<br>
<br>
// Assert that materialization is complete by now.<br>
ExpectNoMoreMaterialization = true;<br>
<br>
// Look up bar to verify that no further materialization happens.<br>
- auto BarResult = cantFail(ES.lookup({{&JD, false}}, Bar));<br>
+ auto BarResult = cantFail(ES.lookup({&JD}, Bar));<br>
EXPECT_EQ(BarResult.getAddress(), BarSym.getAddress())<br>
<< "Expected Bar == BarSym";<br>
}<br>
@@ -688,7 +685,7 @@ TEST_F(CoreAPIsStandardTest, GeneratorTe<br>
return SymbolNameSet({Bar});<br>
});<br>
<br>
- auto Result = cantFail(ES.lookup({{&JD, false}}, {Foo, Bar}));<br>
+ auto Result = cantFail(ES.lookup({&JD}, {Foo, Bar}));<br>
<br>
EXPECT_EQ(Result.count(Bar), 1U) << "Expected to find fallback def for 'bar'";<br>
EXPECT_EQ(Result[Bar].getAddress(), BarSym.getAddress())<br>
@@ -704,7 +701,7 @@ TEST_F(CoreAPIsStandardTest, FailResolut<br>
cantFail(JD.define(MU));<br>
<br>
SymbolNameSet Names({Foo, Bar});<br>
- auto Result = ES.lookup({{&JD, false}}, Names);<br>
+ auto Result = ES.lookup({&JD}, Names);<br>
<br>
EXPECT_FALSE(!!Result) << "Expected failure";<br>
if (!Result) {<br>
@@ -736,7 +733,7 @@ TEST_F(CoreAPIsStandardTest, TestLookupW<br>
<br>
cantFail(JD.define(MU));<br>
<br>
- auto FooLookupResult = cantFail(ES.lookup({{&JD, false}}, Foo));<br>
+ auto FooLookupResult = cantFail(ES.lookup({&JD}, Foo));<br>
<br>
EXPECT_EQ(FooLookupResult.getAddress(), FooSym.getAddress())<br>
<< "lookup returned an incorrect address";<br>
@@ -757,7 +754,7 @@ TEST_F(CoreAPIsStandardTest, TestLookupW<br>
<br>
cantFail(JD.define(absoluteSymbols({{Foo, FooSym}})));<br>
<br>
- auto FooLookupResult = cantFail(ES.lookup({{&JD, false}}, Foo));<br>
+ auto FooLookupResult = cantFail(ES.lookup({&JD}, Foo));<br>
<br>
EXPECT_EQ(FooLookupResult.getAddress(), FooSym.getAddress())<br>
<< "lookup returned an incorrect address";<br>
@@ -805,14 +802,14 @@ TEST_F(CoreAPIsStandardTest, TestGetRequ<br>
EXPECT_FALSE(FooMaterialized) << "Foo should not be materialized yet";<br>
EXPECT_FALSE(BarMaterialized) << "Bar should not be materialized yet";<br>
<br>
- auto FooSymResult = cantFail(ES.lookup({{&JD, false}}, Foo));<br>
+ auto FooSymResult = cantFail(ES.lookup({&JD}, Foo));<br>
EXPECT_EQ(FooSymResult.getAddress(), FooSym.getAddress())<br>
<< "Address mismatch for Foo";<br>
<br>
EXPECT_TRUE(FooMaterialized) << "Foo should be materialized now";<br>
EXPECT_FALSE(BarMaterialized) << "Bar still should not be materialized";<br>
<br>
- auto BarSymResult = cantFail(ES.lookup({{&JD, false}}, Bar));<br>
+ auto BarSymResult = cantFail(ES.lookup({&JD}, Bar));<br>
EXPECT_EQ(BarSymResult.getAddress(), BarSym.getAddress())<br>
<< "Address mismatch for Bar";<br>
EXPECT_TRUE(BarMaterialized) << "Bar should be materialized now";<br>
@@ -832,7 +829,7 @@ TEST_F(CoreAPIsStandardTest, TestMateria<br>
<br>
cantFail(JD.define(MU));<br>
<br>
- auto Result = ES.lookup({{&JD, false}}, {Foo, Bar});<br>
+ auto Result = ES.lookup({&JD}, {Foo, Bar});<br>
<br>
EXPECT_TRUE(!!Result) << "Result should be a success value";<br>
EXPECT_EQ(Result->count(Foo), 1U) << "\"Foo\" entry missing";<br>
@@ -864,7 +861,7 @@ TEST_F(CoreAPIsStandardTest, TestMateria<br>
<br>
auto OnReady = [](Error Err) { cantFail(std::move(Err)); };<br>
<br>
- ES.lookup({{&JD, false}}, {Foo}, std::move(OnResolution), std::move(OnReady),<br>
+ ES.lookup({&JD}, {Foo}, std::move(OnResolution), std::move(OnReady),<br>
NoDependenciesToRegister);<br>
<br>
auto MU2 = llvm::make_unique<SimpleMaterializationUnit>(<br>
<br>
Modified: llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp?rev=345078&r1=345077&r2=345078&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp?rev=345078&r1=345077&r2=345078&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp (original)<br>
+++ llvm/trunk/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp Tue Oct 23 13:54:43 2018<br>
@@ -66,7 +66,7 @@ static bool testSetProcessAllSections(st<br>
<br>
ObjLayer.setProcessAllSections(ProcessAllSections);<br>
cantFail(ObjLayer.add(JD, std::move(Obj), ES.allocateVModule()));<br>
- ES.lookup({{&JD, false}}, {Foo}, OnResolveDoNothing, OnReadyDoNothing,<br>
+ ES.lookup({&JD}, {Foo}, OnResolveDoNothing, OnReadyDoNothing,<br>
NoDependenciesToRegister);<br>
return DebugSectionSeen;<br>
}<br>
@@ -157,8 +157,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestO<br>
ObjLayer.setOverrideObjectFlagsWithResponsibilityFlags(true);<br>
<br>
cantFail(CompileLayer.add(JD, std::move(M), ES.allocateVModule()));<br>
- ES.lookup({{&JD, false}}, {Foo},<br>
- [](Expected<SymbolMap> R) { cantFail(std::move(R)); },<br>
+ ES.lookup({&JD}, {Foo}, [](Expected<SymbolMap> R) { cantFail(std::move(R)); },<br>
[](Error Err) { cantFail(std::move(Err)); },<br>
NoDependenciesToRegister);<br>
}<br>
@@ -220,8 +219,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestA<br>
ObjLayer.setAutoClaimResponsibilityForObjectSymbols(true);<br>
<br>
cantFail(CompileLayer.add(JD, std::move(M), ES.allocateVModule()));<br>
- ES.lookup({{&JD, false}}, {Foo},<br>
- [](Expected<SymbolMap> R) { cantFail(std::move(R)); },<br>
+ ES.lookup({&JD}, {Foo}, [](Expected<SymbolMap> R) { cantFail(std::move(R)); },<br>
[](Error Err) { cantFail(std::move(Err)); },<br>
NoDependenciesToRegister);<br>
}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>