diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2013-11-08 17:23:49 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2013-11-08 17:23:49 +0000 |
| commit | 09e604333e56396c88ed4b53dfdf4b2cb0d4370c (patch) | |
| tree | c1a786eb4f5e81beeb1aeb3ffff4a26a9253981a | |
| parent | 5650bcb18e117c4063d64a5378f75b564790c36e (diff) | |
| download | bcm5719-llvm-09e604333e56396c88ed4b53dfdf4b2cb0d4370c.tar.gz bcm5719-llvm-09e604333e56396c88ed4b53dfdf4b2cb0d4370c.zip | |
Add ImmutableSet profiling info for 'bool'.
Useful for tri-state maps: true, false, and "no data yet".
llvm-svn: 194266
| -rw-r--r-- | llvm/include/llvm/ADT/ImmutableSet.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h index 2a0579e29ee..ad349699e2a 100644 --- a/llvm/include/llvm/ADT/ImmutableSet.h +++ b/llvm/include/llvm/ADT/ImmutableSet.h @@ -851,6 +851,18 @@ PROFILE_INTEGER_INFO(unsigned long long) #undef PROFILE_INTEGER_INFO +/// Profile traits for booleans. +template <> +struct ImutProfileInfo<bool> { + typedef const bool value_type; + typedef const bool& value_type_ref; + + static inline void Profile(FoldingSetNodeID& ID, value_type_ref X) { + ID.AddBoolean(X); + } +}; + + /// Generic profile trait for pointer types. We treat pointers as /// references to unique objects. template <typename T> |

