aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-02-07 21:13:46 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-02-07 21:13:46 +0000
commit337c6a8edd6acd6560f8f09f1372d7eca6d8f262 (patch)
tree02459e5a38895cf3806106410113ee786b0ac0ed
parent3dc32ed569ab8f94e8036f5aae9d683c34bd31f3 (diff)
downloadexternal_llvm-337c6a8edd6acd6560f8f09f1372d7eca6d8f262.zip
external_llvm-337c6a8edd6acd6560f8f09f1372d7eca6d8f262.tar.gz
external_llvm-337c6a8edd6acd6560f8f09f1372d7eca6d8f262.tar.bz2
Make the destructor for TypeMapBase protected. Spotted by Duncan Sands with
cppcheck! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95527 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/TypesContext.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/VMCore/TypesContext.h b/lib/VMCore/TypesContext.h
index 93a801b..7419b0e 100644
--- a/lib/VMCore/TypesContext.h
+++ b/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);