Changed isEqual to vmkIsEqual to avoid conflict with other software

llvm-svn: 181198
diff --git a/vmkit/include/vmkit/UTF8.h b/vmkit/include/vmkit/UTF8.h
index 3860b06..66124f0 100644
--- a/vmkit/include/vmkit/UTF8.h
+++ b/vmkit/include/vmkit/UTF8.h
@@ -95,8 +95,8 @@
   static unsigned getHashValue(const UTF8* PtrVal) {
     return PtrVal->hash();
   }
-  static bool isEqual(const UTF8* LHS, const UTF8* RHS) { return LHS->equals(RHS); }
-  static bool isEqualKey(const UTF8* LHS, const UTF8MapKey& Key) {
+  static bool vmkIsEqual(const UTF8* LHS, const UTF8* RHS) { return LHS->equals(RHS); }
+  static bool vmkIsEqualKey(const UTF8* LHS, const UTF8MapKey& Key) {
     return LHS->equals(Key.data, Key.length);
   }
   static UTF8MapKey toKey(const UTF8* utf8) {
@@ -119,7 +119,7 @@
   static unsigned getHashValue(const UTF8MapKey& key) {
     return UTF8::readerHasher(key.data, key.length);
   }
-  static bool isEqual(const UTF8MapKey& LHS, const UTF8MapKey& RHS) {
+  static bool vmkIsEqual(const UTF8MapKey& LHS, const UTF8MapKey& RHS) {
     if (LHS.data == RHS.data) return true;
     if (LHS.length != RHS.length) return false;
     return !memcmp(LHS.data, RHS.data, RHS.length * sizeof(uint16));
diff --git a/vmkit/include/vmkit/VmkitDenseMap.h b/vmkit/include/vmkit/VmkitDenseMap.h
index 84d4959..854656e 100644
--- a/vmkit/include/vmkit/VmkitDenseMap.h
+++ b/vmkit/include/vmkit/VmkitDenseMap.h
@@ -33,7 +33,7 @@
   //static inline T getEmptyKey();
   //static inline T getTombstoneKey();
   //static unsigned getHashValue(const T &Val);
-  //static bool isEqual(const T &LHS, const T &RHS);
+  //static bool vmkIsEqual(const T &LHS, const T &RHS);
 };
 
 template<typename KeyT, typename ValueT,
@@ -71,8 +71,8 @@
   ~VmkitDenseMap() {
     const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey();
     for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) {
-      if (!KeyInfoT::isEqual(P->first, EmptyKey) &&
-          !KeyInfoT::isEqual(P->first, TombstoneKey))
+      if (!KeyInfoT::vmkIsEqual(P->first, EmptyKey) &&
+          !KeyInfoT::vmkIsEqual(P->first, TombstoneKey))
         P->second.~ValueT();
       P->first.~KeyT();
     }
@@ -122,8 +122,8 @@
 
     const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey();
     for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) {
-      if (!KeyInfoT::isEqual(P->first, EmptyKey)) {
-        if (!KeyInfoT::isEqual(P->first, TombstoneKey)) {
+      if (!KeyInfoT::vmkIsEqual(P->first, EmptyKey)) {
+        if (!KeyInfoT::vmkIsEqual(P->first, TombstoneKey)) {
           P->second.~ValueT();
           --NumEntries;
         }
@@ -258,7 +258,7 @@
     }
 
     // If we are writing over a tombstone, remember this.
-    if (!KeyInfoT::isEqual(TheBucket->first, getEmptyKey()))
+    if (!KeyInfoT::vmkIsEqual(TheBucket->first, getEmptyKey()))
       --NumTombstones;
 
     TheBucket->first = Key;
@@ -294,21 +294,21 @@
     BucketT *FoundTombstone = 0;
     const KeyT EmptyKey = getEmptyKey();
     const KeyT TombstoneKey = getTombstoneKey();
-    assert(!KeyInfoT::isEqual(Val, EmptyKey) &&
-           !KeyInfoT::isEqual(Val, TombstoneKey) &&
+    assert(!KeyInfoT::vmkIsEqual(Val, EmptyKey) &&
+           !KeyInfoT::vmkIsEqual(Val, TombstoneKey) &&
            "Empty/Tombstone value shouldn't be inserted into map!");
 
     while (1) {
       BucketT *ThisBucket = BucketsPtr + (BucketNo & (NumBuckets-1));
       // Found Val's bucket?  If so, return it.
-      if (KeyInfoT::isEqual(ThisBucket->first, Val)) {
+      if (KeyInfoT::vmkIsEqual(ThisBucket->first, Val)) {
         FoundBucket = ThisBucket;
         return true;
       }
 
       // If we found an empty bucket, the key doesn't exist in the set.
       // Insert it and return the default value.
-      if (KeyInfoT::isEqual(ThisBucket->first, EmptyKey)) {
+      if (KeyInfoT::vmkIsEqual(ThisBucket->first, EmptyKey)) {
         // If we've already seen a tombstone while probing, fill it in instead
         // of the empty bucket we eventually probed to.
         if (FoundTombstone) ThisBucket = FoundTombstone;
@@ -318,7 +318,7 @@
 
       // If this is a tombstone, remember it.  If Val ends up not in the map, we
       // prefer to return it than something that would require more probing.
-      if (KeyInfoT::isEqual(ThisBucket->first, TombstoneKey) && !FoundTombstone)
+      if (KeyInfoT::vmkIsEqual(ThisBucket->first, TombstoneKey) && !FoundTombstone)
         FoundTombstone = ThisBucket;  // Remember the first tombstone found.
 
       // Otherwise, it's a hash collision or a tombstone, continue quadratic
@@ -367,8 +367,8 @@
     // Insert all the old elements.
     const KeyT TombstoneKey = getTombstoneKey();
     for (BucketT *B = OldBuckets, *E = OldBuckets+OldNumBuckets; B != E; ++B) {
-      if (!KeyInfoT::isEqual(B->first, EmptyKey) &&
-          !KeyInfoT::isEqual(B->first, TombstoneKey)) {
+      if (!KeyInfoT::vmkIsEqual(B->first, EmptyKey) &&
+          !KeyInfoT::vmkIsEqual(B->first, TombstoneKey)) {
         // Insert the key/value into the new table.
         BucketT *DestBucket;
         bool FoundVal = LookupBucketFor(B->first, DestBucket);
@@ -413,8 +413,8 @@
     // Free the old buckets.
     const KeyT TombstoneKey = getTombstoneKey();
     for (BucketT *B = OldBuckets, *E = OldBuckets+OldNumBuckets; B != E; ++B) {
-      if (!KeyInfoT::isEqual(B->first, EmptyKey) &&
-          !KeyInfoT::isEqual(B->first, TombstoneKey)) {
+      if (!KeyInfoT::vmkIsEqual(B->first, EmptyKey) &&
+          !KeyInfoT::vmkIsEqual(B->first, TombstoneKey)) {
         // Free the value.
         B->second.~ValueT();
       }
@@ -501,8 +501,8 @@
     const KeyT Tombstone = KeyInfoT::getTombstoneKey();
 
     while (Ptr != End &&
-           (KeyInfoT::isEqual(Ptr->first, Empty) ||
-            KeyInfoT::isEqual(Ptr->first, Tombstone)))
+           (KeyInfoT::vmkIsEqual(Ptr->first, Empty) ||
+            KeyInfoT::vmkIsEqual(Ptr->first, Tombstone)))
       ++Ptr;
   }
 };
diff --git a/vmkit/include/vmkit/VmkitDenseSet.h b/vmkit/include/vmkit/VmkitDenseSet.h
index 59fa8ca..4a5f121 100644
--- a/vmkit/include/vmkit/VmkitDenseSet.h
+++ b/vmkit/include/vmkit/VmkitDenseSet.h
@@ -59,8 +59,8 @@
   ~VmkitDenseSet() {
     const ValueT EmptyValue = getEmptyValue(), TombstoneValue = getTombstoneValue();
     for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) {
-      if (!ValueInfoT::isEqual(*P, EmptyValue) &&
-          !ValueInfoT::isEqual(*P, TombstoneValue))
+      if (!ValueInfoT::vmkIsEqual(*P, EmptyValue) &&
+          !ValueInfoT::vmkIsEqual(*P, TombstoneValue))
         (*P).~ValueT();
     }
 #ifndef NDEBUG
@@ -109,8 +109,8 @@
 
     const ValueT EmptyValue = getEmptyValue(), TombstoneValue = getTombstoneValue();
     for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) {
-      if (!ValueInfoT::isEqual(*P, EmptyValue)) {
-        if (!ValueInfoT::isEqual(*P, TombstoneValue)) {
+      if (!ValueInfoT::vmkIsEqual(*P, EmptyValue)) {
+        if (!ValueInfoT::vmkIsEqual(*P, TombstoneValue)) {
           P->~ValueT();
           --NumEntries;
         }
@@ -244,7 +244,7 @@
     }
 
     // If we are writing over a tombstone, remember this.
-    if (!ValueInfoT::isEqual(*TheBucket, getEmptyValue()))
+    if (!ValueInfoT::vmkIsEqual(*TheBucket, getEmptyValue()))
       --NumTombstones;
 
     new (TheBucket) ValueT(Value);
@@ -283,14 +283,14 @@
     while (1) {
       BucketT *ThisBucket = BucketsPtr + (BucketNo & (NumBuckets-1));
       // Found Val's bucket?  If so, return it.
-      if (ValueInfoT::isEqualKey(*ThisBucket, Key)) {
+      if (ValueInfoT::vmkIsEqualKey(*ThisBucket, Key)) {
         FoundBucket = ThisBucket;
         return true;
       }
 
       // If we found an empty bucket, the key doesn't exist in the set.
       // Insert it and return the default value.
-      if (ValueInfoT::isEqual(*ThisBucket, EmptyValue)) {
+      if (ValueInfoT::vmkIsEqual(*ThisBucket, EmptyValue)) {
         // If we've already seen a tombstone while probing, fill it in instead
         // of the empty bucket we eventually probed to.
         if (FoundTombstone) ThisBucket = FoundTombstone;
@@ -300,7 +300,7 @@
 
       // If this is a tombstone, remember it.  If Val ends up not in the map, we
       // prefer to return it than something that would require more probing.
-      if (ValueInfoT::isEqual(*ThisBucket, TombstoneValue) && !FoundTombstone)
+      if (ValueInfoT::vmkIsEqual(*ThisBucket, TombstoneValue) && !FoundTombstone)
         FoundTombstone = ThisBucket;  // Remember the first tombstone found.
 
       // Otherwise, it's a hash collision or a tombstone, continue quadratic
@@ -349,8 +349,8 @@
     // Insert all the old elements.
     const ValueT TombstoneValue = getTombstoneValue();
     for (BucketT *B = OldBuckets, *E = OldBuckets+OldNumBuckets; B != E; ++B) {
-      if (!ValueInfoT::isEqual(*B, EmptyValue) &&
-          !ValueInfoT::isEqual(*B, TombstoneValue)) {
+      if (!ValueInfoT::vmkIsEqual(*B, EmptyValue) &&
+          !ValueInfoT::vmkIsEqual(*B, TombstoneValue)) {
         // Insert the value into the new table.
         BucketT *DestBucket;
         KeyT key = ValueInfoT::toKey(*B);
@@ -394,8 +394,8 @@
     // Free the old buckets.
     const ValueT TombstoneValue = getTombstoneValue();
     for (BucketT *B = OldBuckets, *E = OldBuckets+OldNumBuckets; B != E; ++B) {
-      if (!ValueInfoT::isEqual(*B, EmptyValue) &&
-          !ValueInfoT::isEqual(*B, TombstoneValue)) {
+      if (!ValueInfoT::vmkIsEqual(*B, EmptyValue) &&
+          !ValueInfoT::vmkIsEqual(*B, TombstoneValue)) {
         // Free the value.
         (*B).~ValueT();
       }
@@ -480,8 +480,8 @@
     const ValueT Tombstone = ValueInfoT::getTombstoneKey();
 
     while (Ptr != End &&
-           (ValueInfoT::isEqual(*Ptr, Empty) ||
-            ValueInfoT::isEqual(*Ptr, Tombstone)))
+           (ValueInfoT::vmkIsEqual(*Ptr, Empty) ||
+            ValueInfoT::vmkIsEqual(*Ptr, Tombstone)))
       ++Ptr;
   }
 };