diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2010-02-07 21:13:46 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2010-02-07 21:13:46 +0000 |
| commit | b1d5ead9fb7fd73983e6eb34f0d1c06fafbd0682 (patch) | |
| tree | e80120a6704e732d573da48c4bcf737447c1df6a /llvm/lib | |
| parent | a1b98ab7d5885c009b578329f04842fa84cd4516 (diff) | |
| download | bcm5719-llvm-b1d5ead9fb7fd73983e6eb34f0d1c06fafbd0682.tar.gz bcm5719-llvm-b1d5ead9fb7fd73983e6eb34f0d1c06fafbd0682.zip | |
Make the destructor for TypeMapBase protected. Spotted by Duncan Sands with
cppcheck!
llvm-svn: 95527
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/TypesContext.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/TypesContext.h b/llvm/lib/VMCore/TypesContext.h index 93a801b9f66..7419b0e8945 100644 --- a/llvm/lib/VMCore/TypesContext.h +++ b/llvm/lib/VMCore/TypesContext.h @@ -216,7 +216,6 @@ protected: /// std::multimap<unsigned, PATypeHolder> TypesByHash; -public: ~TypeMapBase() { // PATypeHolder won't destroy non-abstract types. // We can't destroy them by simply iterating, because @@ -236,6 +235,7 @@ public: } } +public: void RemoveFromTypesByHash(unsigned Hash, const Type *Ty) { std::multimap<unsigned, PATypeHolder>::iterator I = TypesByHash.lower_bound(Hash); @@ -281,7 +281,6 @@ class TypeMap : public TypeMapBase { std::map<ValType, PATypeHolder> Map; public: typedef typename std::map<ValType, PATypeHolder>::iterator iterator; - ~TypeMap() { print("ON EXIT"); } inline TypeClass *get(const ValType &V) { iterator I = Map.find(V); |

