[llvm] r343367 - [ORC] Make MaterializationResponsibility::getRequestedSymbols() const.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 28 15:03:17 PDT 2018
Author: lhames
Date: Fri Sep 28 15:03:17 2018
New Revision: 343367
URL: http://llvm.org/viewvc/llvm-project?rev=343367&view=rev
Log:
[ORC] Make MaterializationResponsibility::getRequestedSymbols() const.
This makes it available for use in IRTransformLayer2::TransformFunction
instances (since a const MaterializationResponsibility& parameter was
added in r343365).
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h
llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h?rev=343367&r1=343366&r2=343367&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h Fri Sep 28 15:03:17 2018
@@ -167,7 +167,7 @@ public:
/// MaterializationResponsibility object that have queries pending. This
/// information can be used to return responsibility for unrequested symbols
/// back to the JITDylib via the delegate method.
- SymbolNameSet getRequestedSymbols();
+ SymbolNameSet getRequestedSymbols() const;
/// Notifies the target JITDylib that the given symbols have been resolved.
/// This will update the given symbols' addresses in the JITDylib, and notify
@@ -623,7 +623,7 @@ private:
void replace(std::unique_ptr<MaterializationUnit> MU);
- SymbolNameSet getRequestedSymbols(const SymbolFlagsMap &SymbolFlags);
+ SymbolNameSet getRequestedSymbols(const SymbolFlagsMap &SymbolFlags) const;
void addDependencies(const SymbolStringPtr &Name,
const SymbolDependenceMap &Dependants);
Modified: llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp?rev=343367&r1=343366&r2=343367&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp Fri Sep 28 15:03:17 2018
@@ -367,7 +367,7 @@ MaterializationResponsibility::~Material
"All symbols should have been explicitly materialized or failed");
}
-SymbolNameSet MaterializationResponsibility::getRequestedSymbols() {
+SymbolNameSet MaterializationResponsibility::getRequestedSymbols() const {
return JD.getRequestedSymbols(SymbolFlags);
}
@@ -775,13 +775,14 @@ void JITDylib::replace(std::unique_ptr<M
ES.dispatchMaterialization(*this, std::move(MustRunMU));
}
-SymbolNameSet JITDylib::getRequestedSymbols(const SymbolFlagsMap &SymbolFlags) {
+SymbolNameSet
+JITDylib::getRequestedSymbols(const SymbolFlagsMap &SymbolFlags) const {
return ES.runSessionLocked([&]() {
SymbolNameSet RequestedSymbols;
for (auto &KV : SymbolFlags) {
assert(Symbols.count(KV.first) && "JITDylib does not cover this symbol?");
- assert(Symbols[KV.first].getFlags().isMaterializing() &&
+ assert(Symbols.find(KV.first)->second.getFlags().isMaterializing() &&
"getRequestedSymbols can only be called for materializing "
"symbols");
auto I = MaterializingInfos.find(KV.first);
More information about the llvm-commits
mailing list