forked from OSchip/llvm-project
[z/OS][AIX] Move lambda definition to fix build problem
This is a follow on change to eed19bd8
and contains a fix for a build
failure that occurs on both z/OS and AIX as a result of this commit:
https://reviews.llvm.org/rG670915094462d831e3733e5b01a76471b8cf6dd8.
This commit is contained in:
parent
11e879d4f1
commit
8dea7f3202
|
@ -75,31 +75,31 @@ void LazyCallThroughManager::resolveTrampolineLandingAddress(
|
||||||
if (!Entry)
|
if (!Entry)
|
||||||
return NotifyLandingResolved(reportCallThroughError(Entry.takeError()));
|
return NotifyLandingResolved(reportCallThroughError(Entry.takeError()));
|
||||||
|
|
||||||
// Declaring SLS outside of the call to ES.lookup is a workaround to fix build
|
// Declaring SLS and the callback outside of the call to ES.lookup is a
|
||||||
// failures on AIX and on z/OS platforms.
|
// workaround to fix build failures on AIX and on z/OS platforms.
|
||||||
SymbolLookupSet SLS({Entry->SymbolName});
|
SymbolLookupSet SLS({Entry->SymbolName});
|
||||||
|
auto Callback = [this, TrampolineAddr, SymbolName = Entry->SymbolName,
|
||||||
|
NotifyLandingResolved = std::move(NotifyLandingResolved)](
|
||||||
|
Expected<SymbolMap> Result) mutable {
|
||||||
|
if (Result) {
|
||||||
|
assert(Result->size() == 1 && "Unexpected result size");
|
||||||
|
assert(Result->count(SymbolName) && "Unexpected result value");
|
||||||
|
JITTargetAddress LandingAddr = (*Result)[SymbolName].getAddress();
|
||||||
|
|
||||||
ES.lookup(
|
if (auto Err = notifyResolved(TrampolineAddr, LandingAddr))
|
||||||
LookupKind::Static,
|
NotifyLandingResolved(reportCallThroughError(std::move(Err)));
|
||||||
makeJITDylibSearchOrder(Entry->SourceJD,
|
else
|
||||||
JITDylibLookupFlags::MatchAllSymbols),
|
NotifyLandingResolved(LandingAddr);
|
||||||
std::move(SLS), SymbolState::Ready,
|
} else {
|
||||||
[this, TrampolineAddr, SymbolName = Entry->SymbolName,
|
NotifyLandingResolved(reportCallThroughError(Result.takeError()));
|
||||||
NotifyLandingResolved = std::move(NotifyLandingResolved)](
|
}
|
||||||
Expected<SymbolMap> Result) mutable {
|
};
|
||||||
if (Result) {
|
|
||||||
assert(Result->size() == 1 && "Unexpected result size");
|
|
||||||
assert(Result->count(SymbolName) && "Unexpected result value");
|
|
||||||
JITTargetAddress LandingAddr = (*Result)[SymbolName].getAddress();
|
|
||||||
|
|
||||||
if (auto Err = notifyResolved(TrampolineAddr, LandingAddr))
|
ES.lookup(LookupKind::Static,
|
||||||
NotifyLandingResolved(reportCallThroughError(std::move(Err)));
|
makeJITDylibSearchOrder(Entry->SourceJD,
|
||||||
else
|
JITDylibLookupFlags::MatchAllSymbols),
|
||||||
NotifyLandingResolved(LandingAddr);
|
std::move(SLS), SymbolState::Ready, std::move(Callback),
|
||||||
} else
|
NoDependenciesToRegister);
|
||||||
NotifyLandingResolved(reportCallThroughError(Result.takeError()));
|
|
||||||
},
|
|
||||||
NoDependenciesToRegister);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Expected<std::unique_ptr<LazyCallThroughManager>>
|
Expected<std::unique_ptr<LazyCallThroughManager>>
|
||||||
|
|
Loading…
Reference in New Issue