HomePhabricator

[Utility] Simplify and generalize the CleanUp helper, NFC

Authored by vsk on Feb 23 2018, 2:08 PM.

Description

[Utility] Simplify and generalize the CleanUp helper, NFC

Removing the template arguments and most of the mutating methods from
CleanUp makes it easier to understand and reuse.

In its present state, CleanUp would be too cumbersome to adapt to cases
where multiple objects need to be released. Take for example this change
in swift-lldb:

https://github.com/apple/swift-lldb/pull/334/files#diff-6f474df750f75c8ba675f2a8408a5629R219

This change is simple to express with the new CleanUp, but not so simple
with the old version.

Differential Revision: https://reviews.llvm.org/D43662

llvm-svn: 325964

Details

Committed
vskFeb 23 2018, 2:08 PM
Differential Revision
D43662: [Utility] Simplify and generalize the CleanUp helper, NFC
Parents
rGffac3ed3417e: [ELF] Fix IsPreemptible comment and typo. NFC
Branches
Unknown
Tags
Unknown