Move equality function for AliasAnalysis::Location from DenseMapInfo to Location...
[oota-llvm.git] / include / llvm / Analysis / AliasAnalysis.h
index 6999bd1a0294c250f9e2f4ff3d53c77de3a927bc..ac9d21c590a463aae334f15b2c7fba39aeab2737 100644 (file)
@@ -134,6 +134,10 @@ public:
       Copy.AATags = AAMDNodes();
       return Copy;
     }
+
+    bool operator==(const AliasAnalysis::Location &Other) const {
+      return Ptr == Other.Ptr && Size == Other.Size && AATags == Other.AATags;
+    }
   };
 
   /// getLocation - Fill in Loc with information about the memory reference by
@@ -615,9 +619,7 @@ struct DenseMapInfo<AliasAnalysis::Location> {
   }
   static bool isEqual(const AliasAnalysis::Location &LHS,
                       const AliasAnalysis::Location &RHS) {
-    return LHS.Ptr == RHS.Ptr &&
-           LHS.Size == RHS.Size &&
-           LHS.AATags == RHS.AATags;
+    return LHS == RHS;
   }
 };