aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/IdentifierTable.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-16 16:06:31 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-16 16:06:31 +0000
commitd36adf553cd71df96fe869204482e0f0d68c6bbf (patch)
treedd11af49b689ea084231c1c153b9810caecbd2c5 /include/clang/Basic/IdentifierTable.h
parente396c7bd99ed99fd8136fadc8945791754c61b16 (diff)
Don't add two code-completion results for the same selector; it
doesn't add any value. Instead, we'll just take the first method with that selector that we find and create a completion for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/IdentifierTable.h')
-rw-r--r--include/clang/Basic/IdentifierTable.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index 24fe086a79..2cb68b39be 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -570,6 +570,17 @@ struct DenseMapInfo<clang::Selector> {
template <>
struct isPodLike<clang::Selector> { static const bool value = true; };
+template<>
+class PointerLikeTypeTraits<clang::Selector> {
+public:
+ static inline const void *getAsVoidPointer(clang::Selector P) {
+ return P.getAsOpaquePtr();
+ }
+ static inline clang::Selector getFromVoidPointer(const void *P) {
+ return clang::Selector(reinterpret_cast<uintptr_t>(P));
+ }
+ enum { NumLowBitsAvailable = 0 };
+};
// Provide PointerLikeTypeTraits for IdentifierInfo pointers, which
// are not guaranteed to be 8-byte aligned.