summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-19 00:51:42 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-19 00:51:42 +0000
commit791e5c9dd5fccea98e1e8de3cb5220b639713791 (patch)
tree943db1a0a018cffa985ff71f8ba17b600179c6c0 /llvm/lib
parente2ade289be7504add6e9855536cb65782b1b3f4b (diff)
downloadbcm5719-llvm-791e5c9dd5fccea98e1e8de3cb5220b639713791.tar.gz
bcm5719-llvm-791e5c9dd5fccea98e1e8de3cb5220b639713791.zip
Put TypesEqual and TypeHasCycleThroughItself in namespace llvm so ADL from
the templates in TypesContext.h can find them. Caught by clang++. llvm-svn: 91735
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Type.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp
index 310d0e3a29a..fd46aa1f41d 100644
--- a/llvm/lib/VMCore/Type.cpp
+++ b/llvm/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<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...
OpenPOWER on IntegriCloud