[llvm] r223820 - Fix an MSVC failure from r223802

Duncan P. N. Exon Smith dexonsmith at apple.com
Tue Dec 9 12:01:40 PST 2014


Author: dexonsmith
Date: Tue Dec  9 14:01:40 2014
New Revision: 223820

URL: http://llvm.org/viewvc/llvm-project?rev=223820&view=rev
Log:
Fix an MSVC failure from r223802

Modified:
    llvm/trunk/include/llvm/IR/TrackingMDRef.h

Modified: llvm/trunk/include/llvm/IR/TrackingMDRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/TrackingMDRef.h?rev=223820&r1=223819&r2=223820&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/TrackingMDRef.h (original)
+++ llvm/trunk/include/llvm/IR/TrackingMDRef.h Tue Dec  9 14:01:40 2014
@@ -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)); }
 





More information about the llvm-commits mailing list