<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Oops, didn’t realize MSVC has different behavior here. Thanks, Michael, will fix.</div><div class=""><br class=""></div><div class="">Jordan</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 25, 2016, at 13:24, Michael Kuperstein <<a href="mailto:mkuper@google.com" class="">mkuper@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Mike,<div class=""><br class=""></div><div class="">Already fixed in r276672. </div><div class="">The sanitizer bot is still red, but for an unrelated reason - any build that picked that fix up would have also picked up r276671 that apparently breaks StringSwitch.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">  Michae</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jul 25, 2016 at 1:16 PM, Mike Aizatsky <span dir="ltr" class=""><<a href="mailto:aizatsky@google.com" target="_blank" class="">aizatsky@google.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Michael,<div class=""><br class=""></div><div class="">This broke sanitizer-windows bot:</div><div class=""><br class=""></div><div class=""><a href="http://lab.llvm.org:8011/builders/sanitizer-windows/builds/26212" target="_blank" class="">http://lab.llvm.org:8011/builders/sanitizer-windows/builds/26212</a><br class=""></div><div class=""><a href="http://lab.llvm.org:8011/builders/sanitizer-windows/builds/26212/steps/run%20tests/logs/stdio" target="_blank" class="">http://lab.llvm.org:8011/builders/sanitizer-windows/builds/26212/steps/run%20tests/logs/stdio</a><br class=""></div><div class=""><br class=""></div><div class=""><pre style="font-family: 'courier new', courier, monotype, monospace; font-size: inherit; line-height: normal;" class=""><span class="m_-3185482918015539035inbox-inbox-stdout">FAILED: lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/SymbolRewriter.cpp.obj 
C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~1\cl.exe   /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_DEBUG_POINTER_IMPL="" -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib\Transforms\Utils -IC:\b\slave\sanitizer-windows\llvm\lib\Transforms\Utils -Iinclude -IC:\b\slave\sanitizer-windows\llvm\include /DWIN32 /D_WINDOWS   /W4 -wd4141 -wd4146 -wd4180 -wd4244 -wd4258 -wd4267 -wd4291 -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4800 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4324 -w14062 -we4238 /Zc:inline /Oi /Zc:rvalueCast /MD /O2 /Ob2   -UNDEBUG  /EHs-c- /GR- /showIncludes /Folib\Transforms\Utils\CMakeFiles\LLVMTransformUtils.dir\SymbolRewriter.cpp.obj /Fdlib\Transforms\Utils\CMakeFiles\LLVMTransformUtils.dir\ /FS -c C:\b\slave\sanitizer-windows\llvm\lib\Transforms\Utils\SymbolRewriter.cpp
C:\b\slave\sanitizer-windows\llvm\lib\Transforms\Utils\SymbolRewriter.cpp(365) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function
        C:\b\slave\sanitizer-windows\llvm\include\llvm/ADT/STLExtras.h(453): could be 'std::unique_ptr<`anonymous-namespace'::ExplicitRewriteFunctionDescriptor,std::default_delete<`anonymous-namespace'::ExplicitRewriteFunctionDescriptor>> llvm::make_unique<`anonymous-namespace'::ExplicitRewriteFunctionDescriptor,std::string&,std::string&,bool&>(std::string &,std::string &,bool &)'
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\memory(1637): or       'std::unique_ptr<`anonymous-namespace'::ExplicitRewriteFunctionDescriptor,std::default_delete<`anonymous-namespace'::ExplicitRewriteFunctionDescriptor>> std::make_unique<`anonymous-namespace'::ExplicitRewriteFunctionDescriptor,std::string&,std::string&,bool&>(std::string &,std::string &,bool &)' [found using argument-dependent lookup]
        while trying to match the argument list '(std::string, std::string, bool)'
C:\b\slave\sanitizer-windows\llvm\lib\Transforms\Utils\SymbolRewriter.cpp(368) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function
        C:\b\slave\sanitizer-windows\llvm\include\llvm/ADT/STLExtras.h(453): could be 'std::unique_ptr<`anonymous-namespace'::PatternRewriteFunctionDescriptor,std::default_delete<`anonymous-namespace'::PatternRewriteFunctionDescriptor>> llvm::make_unique<`anonymous-namespace'::PatternRewriteFunctionDescriptor,std::string&,std::string&>(std::string &,std::string &)'
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\memory(1637): or       'std::unique_ptr<`anonymous-namespace'::PatternRewriteFunctionDescriptor,std::default_delete<`anonymous-namespace'::PatternRewriteFunctionDescriptor>> std::make_unique<`anonymous-namespace'::PatternRewriteFunctionDescriptor,std::string&,std::string&>(std::string &,std::string &)' [found using argument-dependent lookup]
        while trying to match the argument list '(std::string, std::string)'
C:\b\slave\sanitizer-windows\llvm\lib\Transforms\Utils\SymbolRewriter.cpp(428) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function
        C:\b\slave\sanitizer-windows\llvm\include\llvm/ADT/STLExtras.h(453): could be 'std::unique_ptr<`anonymous-namespace'::ExplicitRewriteGlobalVariableDescriptor,std::default_delete<`anonymous-namespace'::ExplicitRewriteGlobalVariableDescriptor>> llvm::make_unique<`anonymous-namespace'::ExplicitRewriteGlobalVariableDescriptor,std::string&,std::string&,bool>(std::string &,std::string &,bool &&)'
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\memory(1637): or       'std::unique_ptr<`anonymous-namespace'::ExplicitRewriteGlobalVariableDescriptor,std::default_delete<`anonymous-namespace'::ExplicitRewriteGlobalVariableDescriptor>> std::make_unique<`anonymous-namespace'::ExplicitRewriteGlobalVariableDescriptor,std::string&,std::string&,bool>(std::string &,std::string &,bool &&)' [found using argument-dependent lookup]
        while trying to match the argument list '(std::string, std::string, bool)'
C:\b\slave\sanitizer-windows\llvm\lib\Transforms\Utils\SymbolRewriter.cpp(431) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function
        C:\b\slave\sanitizer-windows\llvm\include\llvm/ADT/STLExtras.h(453): could be 'std::unique_ptr<`anonymous-namespace'::PatternRewriteGlobalVariableDescriptor,std::default_delete<`anonymous-namespace'::PatternRewriteGlobalVariableDescriptor>> llvm::make_unique<`anonymous-namespace'::PatternRewriteGlobalVariableDescriptor,std::string&,std::string&>(std::string &,std::string &)'
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\memory(1637): or       'std::unique_ptr<`anonymous-namespace'::PatternRewriteGlobalVariableDescriptor,std::default_delete<`anonymous-namespace'::PatternRewriteGlobalVariableDescriptor>> std::make_unique<`anonymous-namespace'::PatternRewriteGlobalVariableDescriptor,std::string&,std::string&>(std::string &,std::string &)' [found using argument-dependent lookup]
        while trying to match the argument list '(std::string, std::string)'
C:\b\slave\sanitizer-windows\llvm\lib\Transforms\Utils\SymbolRewriter.cpp(491) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function
        C:\b\slave\sanitizer-windows\llvm\include\llvm/ADT/STLExtras.h(453): could be 'std::unique_ptr<`anonymous-namespace'::ExplicitRewriteNamedAliasDescriptor,std::default_delete<`anonymous-namespace'::ExplicitRewriteNamedAliasDescriptor>> llvm::make_unique<`anonymous-namespace'::ExplicitRewriteNamedAliasDescriptor,std::string&,std::string&,bool>(std::string &,std::string &,bool &&)'
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\memory(1637): or       'std::unique_ptr<`anonymous-namespace'::ExplicitRewriteNamedAliasDescriptor,std::default_delete<`anonymous-namespace'::ExplicitRewriteNamedAliasDescriptor>> std::make_unique<`anonymous-namespace'::ExplicitRewriteNamedAliasDescriptor,std::string&,std::string&,bool>(std::string &,std::string &,bool &&)' [found using argument-dependent lookup]
        while trying to match the argument list '(std::string, std::string, bool)'
C:\b\slave\sanitizer-windows\llvm\lib\Transforms\Utils\SymbolRewriter.cpp(494) : error C2668: 'llvm::make_unique' : ambiguous call to overloaded function
        C:\b\slave\sanitizer-windows\llvm\include\llvm/ADT/STLExtras.h(453): could be 'std::unique_ptr<`anonymous-namespace'::PatternRewriteNamedAliasDescriptor,std::default_delete<`anonymous-namespace'::PatternRewriteNamedAliasDescriptor>> llvm::make_unique<`anonymous-namespace'::PatternRewriteNamedAliasDescriptor,std::string&,std::string&>(std::string &,std::string &)'
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\memory(1637): or       'std::unique_ptr<`anonymous-namespace'::PatternRewriteNamedAliasDescriptor,std::default_delete<`anonymous-namespace'::PatternRewriteNamedAliasDescriptor>> std::make_unique<`anonymous-namespace'::PatternRewriteNamedAliasDescriptor,std::string&,std::string&>(std::string &,std::string &)' [found using argument-dependent lookup]
        while trying to match the argument list '(std::string, std::string)'
</span></pre><br class="m_-3185482918015539035inbox-inbox-Apple-interchange-newline"></div><div class=""><br class=""></div></div><div class="HOEnZb"><div class="h5"><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Jul 25, 2016 at 11:18 AM Michael Kuperstein via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: mkuper<br class="">
Date: Mon Jul 25 13:10:54 2016<br class="">
New Revision: 276668<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=276668&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=276668&view=rev</a><br class="">
Log:<br class="">
Don't use iplist in SymbolRewriter. NFC.<br class="">
<br class="">
There didn't appear to be a good reason to use iplist in this case, a regular<br class="">
list of unique_ptr works just as well.<br class="">
Change made in preparation to a new PM port (since iplist is not moveable).<br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/include/llvm/Transforms/Utils/SymbolRewriter.h<br class="">
    llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp<br class="">
<br class="">
Modified: llvm/trunk/include/llvm/Transforms/Utils/SymbolRewriter.h<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SymbolRewriter.h?rev=276668&r1=276667&r2=276668&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SymbolRewriter.h?rev=276668&r1=276667&r2=276668&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/include/llvm/Transforms/Utils/SymbolRewriter.h (original)<br class="">
+++ llvm/trunk/include/llvm/Transforms/Utils/SymbolRewriter.h Mon Jul 25 13:10:54 2016<br class="">
@@ -30,12 +30,11 @@<br class="">
 //<br class="">
 //===----------------------------------------------------------------------===//<br class="">
<br class="">
-#ifndef LLVM_TRANSFORMS_UTILS_SYMBOL_REWRITER_H<br class="">
-#define LLVM_TRANSFORMS_UTILS_SYMBOL_REWRITER_H<br class="">
+#ifndef LLVM_TRANSFORMS_UTILS_SYMBOLREWRITER_H<br class="">
+#define LLVM_TRANSFORMS_UTILS_SYMBOLREWRITER_H<br class="">
<br class="">
-#include "llvm/ADT/ilist.h"<br class="">
-#include "llvm/ADT/ilist_node.h"<br class="">
 #include "llvm/IR/Module.h"<br class="">
+#include <list><br class="">
<br class="">
 namespace llvm {<br class="">
 class MemoryBuffer;<br class="">
@@ -59,7 +58,7 @@ namespace SymbolRewriter {<br class="">
 /// be rewritten or providing a (posix compatible) regular expression that will<br class="">
 /// select the symbols to rewrite.  This descriptor list is passed to the<br class="">
 /// SymbolRewriter pass.<br class="">
-class RewriteDescriptor : public ilist_node<RewriteDescriptor> {<br class="">
+class RewriteDescriptor {<br class="">
   RewriteDescriptor(const RewriteDescriptor &) = delete;<br class="">
<br class="">
   const RewriteDescriptor &<br class="">
@@ -86,7 +85,7 @@ private:<br class="">
   const Type Kind;<br class="">
 };<br class="">
<br class="">
-typedef iplist<RewriteDescriptor> RewriteDescriptorList;<br class="">
+typedef std::list<std::unique_ptr<RewriteDescriptor>> RewriteDescriptorList;<br class="">
<br class="">
 class RewriteMapParser {<br class="">
 public:<br class="">
@@ -110,43 +109,8 @@ private:<br class="">
 };<br class="">
 }<br class="">
<br class="">
-template <><br class="">
-struct ilist_traits<SymbolRewriter::RewriteDescriptor><br class="">
-    : public ilist_default_traits<SymbolRewriter::RewriteDescriptor> {<br class="">
-  mutable ilist_half_node<SymbolRewriter::RewriteDescriptor> Sentinel;<br class="">
-<br class="">
-public:<br class="">
-  // createSentinel is used to get a reference to a node marking the end of<br class="">
-  // the list.  Because the sentinel is relative to this instance, use a<br class="">
-  // non-static method.<br class="">
-  SymbolRewriter::RewriteDescriptor *createSentinel() const {<br class="">
-    // since i[p] lists always publicly derive from the corresponding<br class="">
-    // traits, placing a data member in this class will augment the<br class="">
-    // i[p]list.  Since the NodeTy is expected to publicly derive from<br class="">
-    // ilist_node<NodeTy>, there is a legal viable downcast from it to<br class="">
-    // NodeTy.  We use this trick to superpose i[p]list with a "ghostly"<br class="">
-    // NodeTy, which becomes the sentinel.  Dereferencing the sentinel is<br class="">
-    // forbidden (save the ilist_node<NodeTy>) so no one will ever notice<br class="">
-    // the superposition.<br class="">
-    return static_cast<SymbolRewriter::RewriteDescriptor *>(&Sentinel);<br class="">
-  }<br class="">
-  void destroySentinel(SymbolRewriter::RewriteDescriptor *) {}<br class="">
-<br class="">
-  SymbolRewriter::RewriteDescriptor *provideInitialHead() const {<br class="">
-    return createSentinel();<br class="">
-  }<br class="">
-<br class="">
-  SymbolRewriter::RewriteDescriptor *<br class="">
-  ensureHead(SymbolRewriter::RewriteDescriptor *&) const {<br class="">
-    return createSentinel();<br class="">
-  }<br class="">
-<br class="">
-  static void noteHead(SymbolRewriter::RewriteDescriptor *,<br class="">
-                       SymbolRewriter::RewriteDescriptor *) {}<br class="">
-};<br class="">
-<br class="">
 ModulePass *createRewriteSymbolsPass();<br class="">
 ModulePass *createRewriteSymbolsPass(SymbolRewriter::RewriteDescriptorList &);<br class="">
 }<br class="">
<br class="">
-#endif<br class="">
+#endif //LLVM_TRANSFORMS_UTILS_SYMBOLREWRITER_H<br class="">
<br class="">
Modified: llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp?rev=276668&r1=276667&r2=276668&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp?rev=276668&r1=276667&r2=276668&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp (original)<br class="">
+++ llvm/trunk/lib/Transforms/Utils/SymbolRewriter.cpp Mon Jul 25 13:10:54 2016<br class="">
@@ -361,9 +361,11 @@ parseRewriteFunctionDescriptor(yaml::Str<br class="">
   // TODO see if there is a more elegant solution to selecting the rewrite<br class="">
   // descriptor type<br class="">
   if (!Target.empty())<br class="">
-    DL->push_back(new ExplicitRewriteFunctionDescriptor(Source, Target, Naked));<br class="">
+    DL->push_back(<br class="">
+        make_unique<ExplicitRewriteFunctionDescriptor>(Source, Target, Naked));<br class="">
   else<br class="">
-    DL->push_back(new PatternRewriteFunctionDescriptor(Source, Transform));<br class="">
+    DL->push_back(<br class="">
+        make_unique<PatternRewriteFunctionDescriptor>(Source, Transform));<br class="">
<br class="">
   return true;<br class="">
 }<br class="">
@@ -421,11 +423,12 @@ parseRewriteGlobalVariableDescriptor(yam<br class="">
   }<br class="">
<br class="">
   if (!Target.empty())<br class="">
-    DL->push_back(new ExplicitRewriteGlobalVariableDescriptor(Source, Target,<br class="">
-                                                              /*Naked*/false));<br class="">
+    DL->push_back(<br class="">
+        make_unique<ExplicitRewriteGlobalVariableDescriptor>(Source, Target,<br class="">
+                                                             /*Naked*/ false));<br class="">
   else<br class="">
-    DL->push_back(new PatternRewriteGlobalVariableDescriptor(Source,<br class="">
-                                                             Transform));<br class="">
+    DL->push_back(<br class="">
+        make_unique<PatternRewriteGlobalVariableDescriptor>(Source, Transform));<br class="">
<br class="">
   return true;<br class="">
 }<br class="">
@@ -483,10 +486,12 @@ parseRewriteGlobalAliasDescriptor(yaml::<br class="">
   }<br class="">
<br class="">
   if (!Target.empty())<br class="">
-    DL->push_back(new ExplicitRewriteNamedAliasDescriptor(Source, Target,<br class="">
-                                                          /*Naked*/false));<br class="">
+    DL->push_back(<br class="">
+        make_unique<ExplicitRewriteNamedAliasDescriptor>(Source, Target,<br class="">
+                                                         /*Naked*/ false));<br class="">
   else<br class="">
-    DL->push_back(new PatternRewriteNamedAliasDescriptor(Source, Transform));<br class="">
+    DL->push_back(<br class="">
+        make_unique<PatternRewriteNamedAliasDescriptor>(Source, Transform));<br class="">
<br class="">
   return true;<br class="">
 }<br class="">
@@ -524,7 +529,7 @@ bool RewriteSymbols::runOnModule(Module<br class="">
<br class="">
   Changed = false;<br class="">
   for (auto &Descriptor : Descriptors)<br class="">
-    Changed |= Descriptor.performOnModule(M);<br class="">
+    Changed |= Descriptor->performOnModule(M);<br class="">
<br class="">
   return Changed;<br class="">
 }<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888" class=""><div dir="ltr" class="">-- <br class=""></div><div data-smartmail="gmail_signature" class="">Mike<br class="">Sent from phone</div>
</font></span></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>