<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 4:20 PM, Reid Kleckner 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"><div dir="ltr"><div>Lang, see this thread where I tried to explain to Chandler why this pattern basically doesn't work if you expect this template to instantiated this template in multiple DLLs:<br></div><div><a href="https://groups.google.com/d/topic/llvm-dev/Bo-I7aRS3CA/discussion" target="_blank">https://groups.google.com/d/topic/llvm-dev/Bo-I7aRS3CA/discussion</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">You're trying to ask the loader to coalesce a weak global symbol across DSOs, and that's not something the Windows loader will do for you.</div></div></blockquote><div><br></div><div>Presumably "will /not/ do for you"</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br></div><div class="gmail_extra">Also, it's bad for startup performance on other platforms. I've heard Chris Bieneman go on about how this kind of symbol is banned in some contexts at Apple.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I think you can solve the problem the same way I suggested that Chandler do it: make the derived error classes responsible for providing this symbol, and have classID() return &ThisErrT::ID.</div></div></blockquote><div><br></div><div>Pretty unfortunate additional boilerplate (perhaps moreso in the pass manager than in the error categories, not sure which we'll end up with more of in the long run), but if that's the nearest we can do... </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 4:08 PM, NAKAMURA Takumi 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Lang, sorry for the issue. r264293 missed useful descriptions.<div><br></div><div>A static member's definition cannot be unified among DLLs in Win32 DLL model, that has just "dllexport" and "dllimport". <br><div><br></div></div><div>Although Chandler is proposing to drop supporting Win32 DLL configuration, I would like to watch and support it.</div><div>I am still seeking how to get "class ID" in better way on that configuration.</div><div><div><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Mar 25, 2016 at 7:16 AM Alexey Samsonov <<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Some confusion is going on here. See r264293 which deleted these definitions. As a result, I now have "multiple definitions" error while trying to link ErrorTest</span><br></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 2:17 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: lhames<br>
Date: Thu Mar 24 16:17:50 2016<br>
New Revision: 264341<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=264341&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=264341&view=rev</a><br>
Log:<br>
[Support] Add ErrorInfo::ID static member definition.<br>
<br>
Somehow this got dropped in an earlier patch.<br>
<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/Support/Error.h<br>
<br>
Modified: llvm/trunk/include/llvm/Support/Error.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Error.h?rev=264341&r1=264340&r2=264341&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Error.h?rev=264341&r1=264340&r2=264341&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Support/Error.h (original)<br>
+++ llvm/trunk/include/llvm/Support/Error.h Thu Mar 24 16:17:50 2016<br>
@@ -291,6 +291,9 @@ private:<br>
   static char ID;<br>
 };<br>
<br>
+template <typename ThisErrT, typename ParentErrT><br>
+char ErrorInfo<ThisErrT, ParentErrT>::ID = 0;<br>
+<br>
 /// Special ErrorInfo subclass representing a list of ErrorInfos.<br>
 /// Instances of this class are constructed by joinError.<br>
 class ErrorList final : public ErrorInfo<ErrorList> {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">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/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></blockquote></div></div></div></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">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/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<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/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>