Put TypesEqual and TypeHasCycleThroughItself in namespace llvm so ADL from

the templates in TypesContext.h can find them.  Caught by clang++.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91735 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
John McCall 2009-12-19 00:51:42 +00:00
parent 29b49fc6aa
commit be58a432ac

View File

@ -687,9 +687,11 @@ static bool TypesEqual(const Type *Ty, const Type *Ty2,
}
}
namespace llvm { // in namespace llvm so findable by ADL
static bool TypesEqual(const Type *Ty, const Type *Ty2) {
std::map<const Type *, const Type *> EqTypes;
return TypesEqual(Ty, Ty2, EqTypes);
return ::TypesEqual(Ty, Ty2, EqTypes);
}
}
// AbstractTypeHasCycleThrough - Return true there is a path from CurTy to
@ -725,8 +727,10 @@ static bool ConcreteTypeHasCycleThrough(const Type *TargetTy, const Type *CurTy,
return false;
}
/// TypeHasCycleThroughItself - Return true if the specified type has a cycle
/// back to itself.
/// TypeHasCycleThroughItself - Return true if the specified type has
/// a cycle back to itself.
namespace llvm { // in namespace llvm so it's findable by ADL
static bool TypeHasCycleThroughItself(const Type *Ty) {
SmallPtrSet<const Type*, 128> VisitedTypes;
@ -743,6 +747,7 @@ static bool TypeHasCycleThroughItself(const Type *Ty) {
}
return false;
}
}
//===----------------------------------------------------------------------===//
// Function Type Factory and Value Class...