Replace std::map<K, V*> with std::map<K, std::unique_ptr<V>> to handle ownership...
authorCraig Topper <craig.topper@gmail.com>
Thu, 11 Dec 2014 05:25:30 +0000 (05:25 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 11 Dec 2014 05:25:30 +0000 (05:25 +0000)
commit7adf2bf76a10bc873ebf9d3a88209a44bd7ad799
treebc90c8137ae97dd64d671991793db6be5e2204d9
parent611a3ef0bcc26f5008ba1a61f600e11866a1bb49
Replace std::map<K, V*> with std::map<K, std::unique_ptr<V>> to handle ownership and deletion of the values.

Ideally we would store the MultiClasses by value directly in the maps, but I had some trouble with that before and this at least fixes the leak.

llvm-svn: 223997
llvm/lib/TableGen/TGParser.cpp
llvm/lib/TableGen/TGParser.h