diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-15 07:26:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-15 07:26:51 +0000 |
commit | 06159e878569e5f39bf0e8f11b84ac3ad0970597 (patch) | |
tree | b6f89ddeddb7a6922cf308ce754a15e3b0195c1c /lib | |
parent | 2125adba899ea5fc2e3eeb49028920f774dfd20b (diff) |
update to match LLVM API change:
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/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/GlobalDecl.h | 15 | ||||
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 7 |
3 files changed, 9 insertions, 19 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 1df4f7cb51..9639ad98fa 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -675,11 +675,9 @@ template <> struct DenseMapInfo<ObjCSummaryKey> { RHS.getSelector()); } - static bool isPod() { - return DenseMapInfo<ObjCInterfaceDecl*>::isPod() && - DenseMapInfo<Selector>::isPod(); - } }; +template <> +struct isPodLike<ObjCSummaryKey> { static const bool value = true; }; } // end llvm namespace namespace { diff --git a/lib/CodeGen/GlobalDecl.h b/lib/CodeGen/GlobalDecl.h index b812020f2a..b054312a01 100644 --- a/lib/CodeGen/GlobalDecl.h +++ b/lib/CodeGen/GlobalDecl.h @@ -96,15 +96,14 @@ namespace llvm { return LHS == RHS; } - static bool isPod() { - // GlobalDecl isn't *technically* a POD type. However, we can get - // away with calling it a POD type since its copy constructor, - // copy assignment operator, and destructor are all trivial. - return true; - } - }; -} + // GlobalDecl isn't *technically* a POD type. However, its copy constructor, + // copy assignment operator, and destructor are all trivial. + template <> + struct isPodLike<clang::CodeGen::GlobalDecl> { + static const bool value = true; + }; +} // end namespace llvm #endif diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index 42ac6f19b0..4ce9330fc1 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -240,13 +240,6 @@ public: } }; -namespace llvm { - template<> - struct DenseMapInfo<ResultBuilder::ShadowMapEntry> { - static bool isPod() { return false; } - }; -} - ResultBuilder::ShadowMapEntry::iterator ResultBuilder::ShadowMapEntry::begin() const { if (DeclOrVector.isNull()) |