1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Put TypesEqual and TypeHasCycleThroughItself in namespace llvm so ADL from

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

llvm-svn: 91735
This commit is contained in:
John McCall 2009-12-19 00:51:42 +00:00
parent 2a794804da
commit fdae393452

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...