mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-21 03:32:29 +00:00
RegionInfo: Make sure to free cached nodes; Tobias, please check!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109650 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
36880e704f
commit
329878f4dd
@ -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…
x
Reference in New Issue
Block a user