diff options
author | Chris Lattner <sabre@nondot.org> | 2013-05-25 22:28:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2013-05-25 22:28:22 +0000 |
commit | 03abfc7114ce60ef69c4335c16eb264957340fad (patch) | |
tree | f09b86a099a0cfa40482f871cd7f578b9777cb8a /include | |
parent | 41b646c127300c6e3b83f1a0bfc49c812110ebf4 (diff) | |
download | external_llvm-03abfc7114ce60ef69c4335c16eb264957340fad.zip external_llvm-03abfc7114ce60ef69c4335c16eb264957340fad.tar.gz external_llvm-03abfc7114ce60ef69c4335c16eb264957340fad.tar.bz2 |
Disable the StringMapEntry copy constructor, to make sure we
reject things like: "for (auto Entry : SomeStringMap)". Previously
this would copy the value but not the tail allocated string data
(the key).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/StringMap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h index 197230e..0838ebe 100644 --- a/include/llvm/ADT/StringMap.h +++ b/include/llvm/ADT/StringMap.h @@ -116,6 +116,7 @@ public: /// and data. template<typename ValueTy> class StringMapEntry : public StringMapEntryBase { + StringMapEntry(StringMapEntry &E) LLVM_DELETED_FUNCTION; public: ValueTy second; |