diff options
author | Duncan Sands <baldrick@free.fr> | 2010-08-08 12:57:48 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-08-08 12:57:48 +0000 |
commit | 3850f5cedad95e6062671d66b08e1a29e7d5e20f (patch) | |
tree | fec285bde72594bfe40e85b795412db23c1266b5 /include/llvm | |
parent | 21d3eeb02b459824adcbeb17f1ec9d1197eba2b9 (diff) | |
download | external_llvm-3850f5cedad95e6062671d66b08e1a29e7d5e20f.zip external_llvm-3850f5cedad95e6062671d66b08e1a29e7d5e20f.tar.gz external_llvm-3850f5cedad95e6062671d66b08e1a29e7d5e20f.tar.bz2 |
Remove the ValueMap copy constructor. It's not used anywhere,
and removing it catches the mistake of passing a ValueMap by
copy rather than by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/ADT/ValueMap.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/include/llvm/ADT/ValueMap.h b/include/llvm/ADT/ValueMap.h index f756068..181fe71 100644 --- a/include/llvm/ADT/ValueMap.h +++ b/include/llvm/ADT/ValueMap.h @@ -82,18 +82,12 @@ class ValueMap { typedef typename Config::ExtraData ExtraData; MapT Map; ExtraData Data; + ValueMap(const ValueMap&); // DO NOT IMPLEMENT public: typedef KeyT key_type; typedef ValueT mapped_type; typedef std::pair<KeyT, ValueT> value_type; - ValueMap(const ValueMap& Other) : Map(Other.Map), Data(Other.Data) { - // Each ValueMapCVH key contains a pointer to the containing ValueMap. - // The keys in the new map need to point to the new map, not Other. - for (typename MapT::iterator I = Map.begin(), E = Map.end(); I != E; ++I) - I->first.Map = this; - } - explicit ValueMap(unsigned NumInitBuckets = 64) : Map(NumInitBuckets), Data() {} explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64) |