From: Duncan P. N. Exon Smith <dexonsmith@apple.com>
Date: Tue, 7 Apr 2015 17:07:01 +0000 (+0000)
Subject: Workaround continued bot failures with MDTupleTypedArrayWrapper
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=05d49df6d80c5340f33939723754cee42ba0f059;p=oota-llvm.git

Workaround continued bot failures with MDTupleTypedArrayWrapper

Change the explicit constructor to be more specific.  I think this will
get us past the continued bot failures [1] with older clangs.

[1]: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/8203

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234331 91177308-0d34-0410-b5e6-96231b3b80d8
---

diff --git a/include/llvm/IR/Metadata.h b/include/llvm/IR/Metadata.h
index 133e8c4777f..0e22e6bc6f1 100644
--- a/include/llvm/IR/Metadata.h
+++ b/include/llvm/IR/Metadata.h
@@ -1079,10 +1079,10 @@ public:
 
   template <class U>
   explicit MDTupleTypedArrayWrapper(
-      const U &Tuple,
-      typename std::enable_if<
-          std::is_constructible<const MDTuple *, U>::value>::type * = nullptr)
-      : N(Tuple) {}
+      const MDTupleTypedArrayWrapper<U> &Other,
+      typename std::enable_if<!std::is_convertible<U *, T *>::value>::type * =
+          nullptr)
+      : N(Other.get()) {}
 
   explicit operator bool() const { return get(); }
   explicit operator MDTuple *() const { return get(); }