nv50/ir: Clean up references to function values before destroying them.

This commit is contained in:
Francisco Jerez 2012-04-30 15:06:52 +02:00 committed by Christoph Bumiller
parent 12f65e38c0
commit 572bf83ec0
1 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,10 @@ Function::~Function()
if (bbArray)
delete[] bbArray;
// clear value refs and defs
ins.clear();
outs.clear();
for (ArrayList::Iterator it = allInsns.iterator(); !it.end(); it.next())
delete_Instruction(prog, reinterpret_cast<Instruction *>(it.get()));