llvm.org GIT mirror llvm / 0ace78e
[Orc] Remove a bunch of constructors from ObjectLinkingLayer. These constructors were causing trouble for MSVC and older GCCs. This should fix more of the build failures from r226940. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226946 91177308-0d34-0410-b5e6-96231b3b80d8 Lang Hames 5 years ago
2 changed file(s) with 12 addition(s) and 46 deletion(s). Raw diff Collapse all Expand all
9393 template
9494 class ObjectLinkingLayer : public ObjectLinkingLayerBase {
9595 public:
96
9697 /// @brief LoadedObjectInfo list. Contains a list of owning pointers to
9798 /// RuntimeDyld::LoadedObjectInfo instances.
9899 typedef std::vector>
99100 LoadedObjInfoList;
100101
101 /// @brief Default construct an ObjectLinkingLayer.
102 ObjectLinkingLayer() {}
103
104 /// @brief Construct an ObjectLinkingLayer with the given NotifyLoaded
105 /// functor.
106 ObjectLinkingLayer(NotifyLoadedFtor NotifyLoaded)
107 : NotifyLoaded(std::move(NotifyLoaded)) {}
108
109 /// @brief Construct an ObjectLinkingLayer with the given NotifyFinalized
110 /// functor.
111 ObjectLinkingLayer(std::function NotifyFinalized)
112 : NotifyFinalized(std::move(NotifyFinalized)) {}
113
114 /// @brief Construct an ObjectLinkingLayer with the given CreateMemoryManager
115 /// functor.
116 ObjectLinkingLayer(
117 std::function()> CreateMemoryManager)
118 : CreateMemoryManager(std::move(CreateMemoryManager)) {}
119
120 /// @brief Construct an ObjectLinkingLayer with the given NotifyLoaded and
121 /// NotifyFinalized functors.
122 ObjectLinkingLayer(NotifyLoadedFtor NotifyLoaded,
123 std::function NotifyFinalized)
124 : NotifyLoaded(std::move(NotifyLoaded)),
125 NotifyFinalized(std::move(NotifyFinalized)) {}
126
127 /// @brief Construct an ObjectLinkingLayer with the given NotifyLoaded and
128 /// CreateMemoryManager functors.
129 ObjectLinkingLayer(
130 NotifyLoadedFtor NotifyLoaded,
131 std::function()> CreateMemoryManager)
132 : NotifyLoaded(std::move(NotifyLoaded)),
133 CreateMemoryManager(std::move(CreateMemoryManager)) {}
134
135 /// @brief Construct an ObjectLinkingLayer with the given NotifyFinalized and
136 /// CreateMemoryManager functors.
137 ObjectLinkingLayer(
138 std::function NotifyFinalized,
139 std::function()> CreateMemoryManager)
140 : NotifyFinalized(std::move(NotifyFinalized)),
141 CreateMemoryManager(std::move(CreateMemoryManager)) {}
102 /// @brief Functor to create RTDyldMemoryManager instances.
103 typedef std::function()> CreateRTDyldMMFtor;
104
105 /// @brief Functor for receiving finalization notifications.
106 typedef std::function NotifyFinalizedFtor;
142107
143108 /// @brief Construct an ObjectLinkingLayer with the given NotifyLoaded,
144109 /// NotifyFinalized and CreateMemoryManager functors.
145110 ObjectLinkingLayer(
111 CreateRTDyldMMFtor CreateMemoryManager,
146112 NotifyLoadedFtor NotifyLoaded,
147 std::function NotifyFinalized,
148 std::function()> CreateMemoryManager)
113 NotifyFinalizedFtor NotifyFinalized)
149114 : NotifyLoaded(std::move(NotifyLoaded)),
150115 NotifyFinalized(std::move(NotifyFinalized)),
151116 CreateMemoryManager(std::move(CreateMemoryManager)) {}
244209 private:
245210 LinkedObjectSetListT LinkedObjSetList;
246211 NotifyLoadedFtor NotifyLoaded;
247 std::function NotifyFinalized;
248 std::function()> CreateMemoryManager;
212 NotifyFinalizedFtor NotifyFinalized;
213 CreateRTDyldMMFtor CreateMemoryManager;
249214 };
250215
251216 } // end namespace llvm
121121 : TM(std::move(TM)), MM(std::move(MM)),
122122 Mang(this->TM->getSubtargetImpl()->getDataLayout()),
123123 NotifyObjectLoaded(*this), NotifyFinalized(*this),
124 ObjectLayer(NotifyObjectLoaded, NotifyFinalized),
124 ObjectLayer(ObjectLayerT::CreateRTDyldMMFtor(), NotifyObjectLoaded,
125 NotifyFinalized),
125126 CompileLayer(ObjectLayer, SimpleCompiler(*this->TM)),
126127 LazyEmitLayer(CompileLayer) {
127128 setDataLayout(this->TM->getSubtargetImpl()->getDataLayout());