OSDN Git Service

Revert r222957 "Replace std::map<K, V*> with std::map<K, V> to handle ownership and...
authorCraig Topper <craig.topper@gmail.com>
Sun, 30 Nov 2014 01:20:17 +0000 (01:20 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 30 Nov 2014 01:20:17 +0000 (01:20 +0000)
commit73642a847d9c254140030d0a803f610967b81f9e
tree1c6d3b92785bec5459a56bbee348892e0d26ba32
parent066fdfa0dd9f9c4e9a560d0261614ae2277f1eba
Revert r222957 "Replace std::map<K, V*> with std::map<K, V> to handle ownership and deletion of the values."

Upon further review I think the MultiClass is being copied into the map instead of being moved due to the copy constructor on the nested Record type. This ultimately got exposed when the vector in DefPrototype vector was changed to hold unique_ptrs in another commit. This caused gcc 4.7 to fail due to the use of the copy constructor on unique_ptr with the error pointing back to one of the insert calls from this commit. Not sure why clang was able to build.

This reverts commit 710cdf729f84b428bf41aa8d32dbdb35fff79fde.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222971 91177308-0d34-0410-b5e6-96231b3b80d8
lib/TableGen/TGParser.cpp
lib/TableGen/TGParser.h