mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-06 02:47:20 +00:00
RegionInfo: Make sure to free cached nodes; Tobias, please check!
llvm-svn: 109650
This commit is contained in:
parent
1c35389c03
commit
111cf008aa
@ -59,6 +59,11 @@ Region::Region(BasicBlock *Entry, BasicBlock *Exit, RegionInfo* RInfo,
|
||||
: RegionNode(Parent, Entry, 1), RI(RInfo), DT(dt), exit(Exit) {}
|
||||
|
||||
Region::~Region() {
|
||||
// Free the cached nodes.
|
||||
for (BBNodeMapT::iterator it = BBNodeMap.begin(),
|
||||
ie = BBNodeMap.end(); it != ie; ++it)
|
||||
delete it->second;
|
||||
|
||||
// Only clean the cache for this Region. Caches of child Regions will be
|
||||
// cleaned when the child Regions are deleted.
|
||||
BBNodeMap.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user