From be58a432ac9ccaaccc8fa7ca813d3d69fbdb545e Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 19 Dec 2009 00:51:42 +0000 Subject: [PATCH] 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 --- lib/VMCore/Type.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 310d0e3a29a..fd46aa1f41d 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -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 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 VisitedTypes; @@ -743,6 +747,7 @@ static bool TypeHasCycleThroughItself(const Type *Ty) { } return false; } +} //===----------------------------------------------------------------------===// // Function Type Factory and Value Class... -- 2.34.1