depot/third_party/nixpkgs/pkgs/development/interpreters/cling/fix-llvm-include.patch
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

27 lines
1.2 KiB
Diff

diff --git a/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h b/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
index 16202d8..3afdac3 100644
--- a/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
+++ b/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
@@ -220,7 +220,7 @@ public:
Error removeModule(VModuleKey K) {
auto I = ModuleMap.find(K);
assert(I != ModuleMap.end() && "VModuleKey K not valid here");
- auto EDM = std::move(I.second);
+ auto EDM = std::move(I->second);
ModuleMap.erase(I);
return EDM->removeModuleFromBaseLayer(BaseLayer);
}
diff --git a/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h b/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
index d9535ce..4c688c3 100644
--- a/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
+++ b/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
@@ -472,7 +472,9 @@ private:
// NB! `LinkedObjects` needs to be destroyed before `NotifyFreed` because
// `~ConcreteLinkedObject` calls `NotifyFreed`
+protected:
std::map<VModuleKey, std::unique_ptr<LinkedObject>> LinkedObjects;
+private:
bool ProcessAllSections = false;
};