Example #1
0
bool DenseMapInfo<ComparableFunction>::isEqual(const ComparableFunction &LHS,
                                               const ComparableFunction &RHS) {
  if (LHS.getFunc() == RHS.getFunc() &&
      LHS.getHash() == RHS.getHash())
    return true;
  if (!LHS.getFunc() || !RHS.getFunc())
    return false;
  assert(LHS.getTD() == RHS.getTD() &&
         "Comparing functions for different targets");
  return FunctionComparator(LHS.getTD(),
                            LHS.getFunc(), RHS.getFunc()).Compare();
}
Example #2
0
bool DenseMapInfo<ComparableFunction>::isEqual(const ComparableFunction &LHS,
                                               const ComparableFunction &RHS) {
  if (LHS.getFunc() == RHS.getFunc() &&
      LHS.getHash() == RHS.getHash())
    return true;
  if (!LHS.getFunc() || !RHS.getFunc())
    return false;

  // One of these is a special "underlying pointer comparison only" object.
  if (LHS.getDataLayout() == ComparableFunction::LookupOnly ||
      RHS.getDataLayout() == ComparableFunction::LookupOnly)
    return false;

  assert(LHS.getDataLayout() == RHS.getDataLayout() &&
         "Comparing functions for different targets");

  return FunctionComparator(LHS.getDataLayout(), LHS.getFunc(),
                            RHS.getFunc()).compare();
}
Example #3
0
 static unsigned getHashValue(const ComparableFunction &CF) {
   return CF.getHash();
 }