This is an archive of the discontinued LLVM Phabricator instance.

[mlir] fix memory leak on failure path in parser
ClosedPublic

Authored by ftynse on Mar 11 2021, 2:28 AM.

Details

Summary

Forward references to blocks lead to Blocks being allocated in the
parser, but they are not necessarily included into a region if parsing
fails, leading to a leak. Clean them up in parser destructor.

Diff Detail

Event Timeline

ftynse created this revision.Mar 11 2021, 2:28 AM
ftynse requested review of this revision.Mar 11 2021, 2:28 AM
rriddle accepted this revision.Mar 11 2021, 10:20 AM
This revision is now accepted and ready to land.Mar 11 2021, 10:20 AM
mehdi_amini accepted this revision.Mar 11 2021, 10:52 AM
This revision was automatically updated to reflect the committed changes.