<div dir="ltr">Broke a windows bot. Fix incoming...</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 6, 2017 at 2:33 PM, Lang Hames via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: lhames<br>
Date: Thu Jul 6 14:33:48 2017<br>
New Revision: 307319<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=307319&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=307319&view=rev</a><br>
Log:<br>
[ORC] Update GlobalMappingLayer::<wbr>addModuleSet to addModule.<br>
<br>
This layer was accidentally left out of r306166.<br>
<br>
<br>
Modified:<br>
llvm/trunk/include/llvm/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayer.h<br>
llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayerTest.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h?rev=307319&r1=307318&r2=307319&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/include/<wbr>llvm/ExecutionEngine/Orc/<wbr>GlobalMappingLayer.h?rev=<wbr>307319&r1=307318&r2=307319&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayer.h (original)<br>
+++ llvm/trunk/include/llvm/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayer.h Thu Jul 6 14:33:48 2017<br>
@@ -20,6 +20,10 @@<br>
#include <string><br>
<br>
namespace llvm {<br>
+<br>
+class Module;<br>
+class JITSymbolResolver;<br>
+<br>
namespace orc {<br>
<br>
/// @brief Global mapping layer.<br>
@@ -32,25 +36,22 @@ namespace orc {<br>
template <typename BaseLayerT><br>
class GlobalMappingLayer {<br>
public:<br>
- /// @brief Handle to a set of added modules.<br>
- using ModuleSetHandleT = typename BaseLayerT::ModuleSetHandleT;<br>
+<br>
+ /// @brief Handle to an added module.<br>
+ using ModuleHandleT = typename BaseLayerT::ModuleHandleT;<br>
<br>
/// @brief Construct an GlobalMappingLayer with the given BaseLayer<br>
GlobalMappingLayer(BaseLayerT &BaseLayer) : BaseLayer(BaseLayer) {}<br>
<br>
- /// @brief Add the given module set to the JIT.<br>
+ /// @brief Add the given module to the JIT.<br>
/// @return A handle for the added modules.<br>
- template <typename ModuleSetT, typename MemoryManagerPtrT,<br>
- typename SymbolResolverPtrT><br>
- ModuleSetHandleT addModuleSet(ModuleSetT Ms,<br>
- MemoryManagerPtrT MemMgr,<br>
- SymbolResolverPtrT Resolver) {<br>
- return BaseLayer.addModuleSet(std::<wbr>move(Ms), std::move(MemMgr),<br>
- std::move(Resolver));<br>
+ ModuleHandleT addModule(std::shared_ptr<<wbr>Module> M,<br>
+ std::shared_ptr<<wbr>JITSymbolResolver> Resolver) {<br>
+ return BaseLayer.addModule(std::move(<wbr>M), std::move(Resolver));<br>
}<br>
<br>
/// @brief Remove the module set associated with the handle H.<br>
- void removeModuleSet(<wbr>ModuleSetHandleT H) { BaseLayer.removeModuleSet(H); }<br>
+ void removeModule(ModuleHandleT H) { BaseLayer.removeModule(H); }<br>
<br>
/// @brief Manually set the address to return for the given symbol.<br>
void setGlobalMapping(const std::string &Name, JITTargetAddress Addr) {<br>
@@ -78,15 +79,15 @@ public:<br>
return BaseLayer.findSymbol(Name, ExportedSymbolsOnly);<br>
}<br>
<br>
- /// @brief Get the address of the given symbol in the context of the set of<br>
- /// modules represented by the handle H. This call is forwarded to the<br>
+ /// @brief Get the address of the given symbol in the context of the of the<br>
+ /// module represented by the handle H. This call is forwarded to the<br>
/// base layer's implementation.<br>
- /// @param H The handle for the module set to search in.<br>
+ /// @param H The handle for the module to search in.<br>
/// @param Name The name of the symbol to search for.<br>
/// @param ExportedSymbolsOnly If true, search only for exported symbols.<br>
/// @return A handle for the given named symbol, if it is found in the<br>
- /// given module set.<br>
- JITSymbol findSymbolIn(ModuleSetHandleT H, const std::string &Name,<br>
+ /// given module.<br>
+ JITSymbol findSymbolIn(ModuleHandleT H, const std::string &Name,<br>
bool ExportedSymbolsOnly) {<br>
return BaseLayer.findSymbolIn(H, Name, ExportedSymbolsOnly);<br>
}<br>
@@ -94,7 +95,7 @@ public:<br>
/// @brief Immediately emit and finalize the module set represented by the<br>
/// given handle.<br>
/// @param H Handle for module set to emit/finalize.<br>
- void emitAndFinalize(<wbr>ModuleSetHandleT H) {<br>
+ void emitAndFinalize(ModuleHandleT H) {<br>
BaseLayer.emitAndFinalize(H);<br>
}<br>
<br>
<br>
Modified: llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayerTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/GlobalMappingLayerTest.cpp?rev=307319&r1=307318&r2=307319&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayerTest.cpp?<wbr>rev=307319&r1=307318&r2=<wbr>307319&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayerTest.cpp (original)<br>
+++ llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>GlobalMappingLayerTest.cpp Thu Jul 6 14:33:48 2017<br>
@@ -17,7 +17,7 @@ namespace {<br>
<br>
struct MockBaseLayer {<br>
<br>
- typedef int ModuleSetHandleT;<br>
+ typedef int ModuleHandleT;<br>
<br>
JITSymbol findSymbol(const std::string &Name, bool ExportedSymbolsOnly) {<br>
if (Name == "bar")<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">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/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>