Fix an MSVC failure from r223802
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 9 Dec 2014 20:01:40 +0000 (20:01 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 9 Dec 2014 20:01:40 +0000 (20:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223820 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/TrackingMDRef.h

index 972ccaa5fe72cc41d99f446405d76477835d9baf..6e1b1bd151046e1683f71381ba6cb9fb6e5817ab 100644 (file)
@@ -78,6 +78,9 @@ public:
     return !MD || !MetadataTracking::isReplaceable(*MD);
   }
 
     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)
 private:
   void track() {
     if (MD)
@@ -124,6 +127,9 @@ public:
   T *operator->() const { return get(); }
   T &operator*() const { return *get(); }
 
   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)); }
 
   void reset() { Ref.reset(); }
   void reset(T *MD) { Ref.reset(static_cast<Metadata *>(MD)); }