<div dir="ltr">Hi Douglas,<div><br></div><div>Thanks for the heads up. This should be fixed as of r<span style="font-size:13px">279908.</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Cheers,</span></div><div><span style="font-size:13px">Lang.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 26, 2016 at 6:25 PM, Yung, Douglas <span dir="ltr"><<a href="mailto:douglas.yung@sony.com" target="_blank">douglas.yung@sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Lang,<br>
<br>
Your checkin seems to have problems building with Visual Studio 2013. In my build I'm seeing the following errors for lines 24, 25 and 26:<br>
<br>
  LogicalDylibTest.cpp<br>
C:\src\llvm\unittests\<wbr>ExecutionEngine\Orc\<wbr>LogicalDylibTest.cpp(24): error C2593: 'operator =' is ambiguous [C:\src\build\unittests\<wbr>ExecutionEngine\Orc\<wbr>OrcJITTests.vcxproj]<br>
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\set(180): could be 'std::set<std::string,std::<wbr>less<_Kty>,std::allocator<_Ty><wbr>> &std::set<_Kty,std::less<_Ty>,<wbr>std::allocator<_Ty>>::operator =(std::initializer_list<std::<wbr>basic_string<char,std::char_<wbr>traits<char>,std::allocator<<wbr>char>>>)'<br>
          with<br>
          [<br>
              _Kty=std::string<br>
  ,            _Ty=std::string<br>
          ]<br>
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\set(139): or       'std::set<std::string,std::<wbr>less<_Kty>,std::allocator<_Ty><wbr>> &std::set<_Kty,std::less<_Ty>,<wbr>std::allocator<_Ty>>::operator =(std::set<_Kty,std::less<_Ty><wbr>,std::allocator<_Ty>> &&)'<br>
          with<br>
          [<br>
              _Kty=std::string<br>
  ,            _Ty=std::string<br>
          ]<br>
          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\set(123): or       'std::set<std::string,std::<wbr>less<_Kty>,std::allocator<_Ty><wbr>> &std::set<_Kty,std::less<_Ty>,<wbr>std::allocator<_Ty>>::operator =(const std::set<_Kty,std::less<_Ty>,<wbr>std::allocator<_Ty>> &)'<br>
          with<br>
          [<br>
              _Kty=std::string<br>
  ,            _Ty=std::string<br>
          ]<br>
          while trying to match the argument list '(std::set<std::string,std::<wbr>less<_Kty>,std::allocator<_Ty><wbr>>, initializer-list)'<br>
          with<br>
          [<br>
              _Kty=std::string<br>
  ,            _Ty=std::string<br>
          ]<br>
<br>
Can you look into this?<br>
<br>
Douglas Yung<br>
<div><div class="h5"><br>
> -----Original Message-----<br>
> From: llvm-commits [mailto:<a href="mailto:llvm-commits-bounces@lists.llvm.org">llvm-commits-bounces@<wbr>lists.llvm.org</a>] On<br>
> Behalf Of Lang Hames via llvm-commits<br>
> Sent: Friday, August 26, 2016 17:19<br>
> To: <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> Subject: [llvm] r279892 - [ORC] Fix typo in LogicalDylib, add unit<br>
> test.<br>
><br>
> Author: lhames<br>
> Date: Fri Aug 26 19:19:05 2016<br>
> New Revision: 279892<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=279892&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=279892&view=rev</a><br>
> Log:<br>
> [ORC] Fix typo in LogicalDylib, add unit test.<br>
><br>
> Added:<br>
>     llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylibTest.cpp<br>
> Modified:<br>
>     llvm/trunk/include/llvm/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylib.h<br>
>     llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>CMakeLists.txt<br>
><br>
> Modified: llvm/trunk/include/llvm/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylib.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> project/llvm/trunk/include/<wbr>llvm/ExecutionEngine/Orc/<wbr>LogicalDylib.h?rev=<br>
> 279892&r1=279891&r2=279892&<wbr>view=diff<br>
> ==============================<wbr>==============================<wbr>===========<br>
> =======<br>
> --- llvm/trunk/include/llvm/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylib.h<br>
> (original)<br>
> +++ llvm/trunk/include/llvm/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylib.h Fri Aug<br>
</div></div>> +++ 26 19:19:05 2016<br>
<span class="">> @@ -130,7 +130,7 @@ public:<br>
>      for (typename LogicalModuleList::size_type I = 0, E =<br>
> LogicalModules.size();<br>
>           I != E; ++I)<br>
>        if (auto Sym = LogicalModules[I].Resources.<wbr>findSymbol(Name,<br>
> ExportedSymbolsOnly))<br>
> -        return &LogicalModules[I]->Resources;<br>
> +        return &LogicalModules[I].Resources;<br>
>      return nullptr;<br>
>    }<br>
><br>
><br>
> Modified: llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>CMakeLists.txt<br>
> URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> project/llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>CMakeLists.txt?rev=279<br>
> 892&r1=279891&r2=279892&view=<wbr>diff<br>
> ==============================<wbr>==============================<wbr>===========<br>
> =======<br>
> --- llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>CMakeLists.txt (original)<br>
> +++ llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>CMakeLists.txt Fri Aug 26<br>
</span>> +++ 19:19:05 2016<br>
<span class="">> @@ -14,6 +14,7 @@ add_llvm_unittest(OrcJITTests<br>
>    IndirectionUtilsTest.cpp<br>
>    GlobalMappingLayerTest.cpp<br>
>    LazyEmittingLayerTest.cpp<br>
> +  LogicalDylibTest.cpp<br>
>    ObjectLinkingLayerTest.cpp<br>
>    ObjectTransformLayerTest.cpp<br>
>    OrcCAPITest.cpp<br>
><br>
> Added: llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylibTest.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> project/llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylibTest.cpp?r<br>
> ev=279892&view=auto<br>
> ==============================<wbr>==============================<wbr>===========<br>
> =======<br>
> --- llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylibTest.cpp<br>
> (added)<br>
> +++ llvm/trunk/unittests/<wbr>ExecutionEngine/Orc/<wbr>LogicalDylibTest.cpp Fri<br>
</span>> +++ Aug 26 19:19:05 2016<br>
<span class="">> @@ -0,0 +1,76 @@<br>
> +//===----- CompileOnDemandLayerTest.cpp - Unit tests for the COD layer<br>
</span>> +----===// //<br>
<span class="">> +//                     The LLVM Compiler Infrastructure<br>
> +//<br>
> +// This file is distributed under the University of Illinois Open<br>
</span>> +Source // License. See LICENSE.TXT for details.<br>
> +//<br>
> +//===------------------------<wbr>------------------------------<wbr>-----------<br>
> -<br>
> +----===//<br>
<span class="">> +<br>
> +#include "OrcTestCommon.h"<br>
> +#include "llvm/ExecutionEngine/Orc/<wbr>LogicalDylib.h"<br>
> +#include "gtest/gtest.h"<br>
> +<br>
> +using namespace llvm;<br>
> +using namespace llvm::orc;<br>
> +<br>
> +namespace {<br>
> +<br>
> +<br>
> +TEST(LogicalDylibTest, getLogicalModuleResourcesForSy<wbr>mbol) {<br>
> +<br>
> +  std::map<int, std::set<std::string>> ModuleSymbols;<br>
> +<br>
</span>> +  ModuleSymbols[0] = { "foo", "dummy" };  ModuleSymbols[1] = { "bar"<br>
<div><div class="h5">> };<br>
> + ModuleSymbols[2] = { "baz", "dummy" };<br>
> +<br>
> +  auto MockBaseLayer = createMockBaseLayer<int>(<br>
> +      DoNothingAndReturn<int>(0),<br>
> +      DoNothingAndReturn<void>(),<br>
> +      [&](const std::string &Name, bool) {<br>
> +        for (auto &S : ModuleSymbols)<br>
> +          if (S.second.count(Name))<br>
> +            return JITSymbol(1, JITSymbolFlags::Exported);<br>
> +        return JITSymbol(nullptr);<br>
> +      },<br>
> +      [&](int H, const std::string &Name, bool) {<br>
> +        if (ModuleSymbols[H].count(Name))<br>
> +          return JITSymbol(1, JITSymbolFlags::Exported);<br>
> +        return JITSymbol(nullptr);<br>
> +      });<br>
> +<br>
> +  struct LDResources { };<br>
> +  struct LMResources {<br>
> +  public:<br>
> +    int ID;<br>
> +    std::set<std::string> *Symbols;<br>
> +<br>
> +    LMResources() : ID(0), Symbols(nullptr) {}<br>
> +    LMResources(int ID, std::set<std::string> &Symbols)<br>
> +        : ID(ID), Symbols(&Symbols) {}<br>
> +<br>
> +    JITSymbol findSymbol(const std::string &Name, bool) {<br>
> +      assert(Symbols);<br>
> +      if (Symbols->count(Name))<br>
> +        return JITSymbol(ID, JITSymbolFlags::Exported);<br>
> +      return JITSymbol(nullptr);<br>
> +    }<br>
> +  };<br>
> +<br>
> +  LogicalDylib<decltype(<wbr>MockBaseLayer), LMResources, LDResources><br>
> +    LD(MockBaseLayer);<br>
> +<br>
> +  // Add logical module resources for each of our dummy modules.<br>
> +  for (int I = 0; I < 3; ++I) {<br>
> +    auto H = LD.createLogicalModule();<br>
> +    LD.addToLogicalModule(H, I);<br>
> +    LD.getLogicalModuleResources(<wbr>H) = LMResources(I,<br>
> ModuleSymbols[I]);<br>
> + }<br>
> +<br>
> +  {<br>
> +    auto LMR = LD.<wbr>getLogicalModuleResourcesForSy<wbr>mbol("bar", true);<br>
> +    EXPECT_TRUE(LMR->ID == 1) << "<wbr>getLogicalModuleResourcesForSy<wbr>mbol<br>
</div></div>> +failed";<br>
<div class="HOEnZb"><div class="h5">> +  }<br>
> +}<br>
> +}<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>
</div></div></blockquote></div><br></div>