aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/ValueHandle.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-15 07:26:43 +0000
committerChris Lattner <sabre@nondot.org>2009-12-15 07:26:43 +0000
commit4bbf4ee1491637c247e195e19e3e4a8ee5ad72fa (patch)
treeb0abe4f45ba17d9284a9220034d62c9caae29db3 /include/llvm/Support/ValueHandle.h
parentf8bc1e4b277dc85a89f93738d7de4d324a093fb4 (diff)
Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ValueHandle.h')
-rw-r--r--include/llvm/Support/ValueHandle.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/llvm/Support/ValueHandle.h b/include/llvm/Support/ValueHandle.h
index a9872a7be1..82c3caeb3a 100644
--- a/include/llvm/Support/ValueHandle.h
+++ b/include/llvm/Support/ValueHandle.h
@@ -254,15 +254,18 @@ struct DenseMapInfo<AssertingVH<T> > {
static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
return LHS == RHS;
}
- static bool isPod() {
+};
+
+template <typename T>
+struct isPodLike<AssertingVH<T> > {
#ifdef NDEBUG
- return true;
+ static const bool value = true;
#else
- return false;
+ static const bool value = false;
#endif
- }
};
+
/// TrackingVH - This is a value handle that tracks a Value (or Value subclass),
/// even across RAUW operations.
///