mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
refcount BitCodeAbbrev objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36747 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -75,12 +75,12 @@ public:
|
||||
// Abbrevs could still exist if the stream was broken. If so, don't leak
|
||||
// them.
|
||||
for (unsigned i = 0, e = CurAbbrevs.size(); i != e; ++i)
|
||||
delete CurAbbrevs[i];
|
||||
CurAbbrevs[i]->dropRef();
|
||||
|
||||
for (unsigned S = 0, e = BlockScope.size(); S != e; ++S) {
|
||||
std::vector<BitCodeAbbrev*> &Abbrevs = BlockScope[S].PrevAbbrevs;
|
||||
for (unsigned i = 0, e = Abbrevs.size(); i != e; ++i)
|
||||
delete Abbrevs[i];
|
||||
Abbrevs[i]->dropRef();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
|
||||
// Delete abbrevs from popped scope.
|
||||
for (unsigned i = 0, e = CurAbbrevs.size(); i != e; ++i)
|
||||
delete CurAbbrevs[i];
|
||||
CurAbbrevs[i]->dropRef();
|
||||
|
||||
BlockScope.back().PrevAbbrevs.swap(CurAbbrevs);
|
||||
BlockScope.pop_back();
|
||||
|
||||
Reference in New Issue
Block a user