From b8755d9dddf2f6e0c8802948699dc4a573815cad Mon Sep 17 00:00:00 2001
From: "Duncan P. N. Exon Smith" <dexonsmith@apple.com>
Date: Tue, 9 Dec 2014 20:01:40 +0000
Subject: [PATCH] Fix an MSVC failure from r223802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223820 91177308-0d34-0410-b5e6-96231b3b80d8
---
 include/llvm/IR/TrackingMDRef.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/llvm/IR/TrackingMDRef.h b/include/llvm/IR/TrackingMDRef.h
index 972ccaa5fe7..6e1b1bd1510 100644
--- a/include/llvm/IR/TrackingMDRef.h
+++ b/include/llvm/IR/TrackingMDRef.h
@@ -78,6 +78,9 @@ public:
     return !MD || !MetadataTracking::isReplaceable(*MD);
   }
 
+  bool operator==(const TrackingMDRef &X) const { return MD == X.MD; }
+  bool operator!=(const TrackingMDRef &X) const { return MD != X.MD; }
+
 private:
   void track() {
     if (MD)
@@ -124,6 +127,9 @@ public:
   T *operator->() const { return get(); }
   T &operator*() const { return *get(); }
 
+  bool operator==(const TypedTrackingMDRef &X) const { return Ref == X.Ref; }
+  bool operator!=(const TypedTrackingMDRef &X) const { return Ref != X.Ref; }
+
   void reset() { Ref.reset(); }
   void reset(T *MD) { Ref.reset(static_cast<Metadata *>(MD)); }