]> granicus.if.org Git - llvm/commit
[llvm-objdump] Add RAII for xar apis
authorFrancis Ricci <francisjricci@gmail.com>
Fri, 6 Oct 2017 15:33:28 +0000 (15:33 +0000)
committerFrancis Ricci <francisjricci@gmail.com>
Fri, 6 Oct 2017 15:33:28 +0000 (15:33 +0000)
commitd7c63220746fd06bc4e5905ae072707da2c389e2
tree9ff9e740dc9eabd504abb42765deb7d94ea8467d
parentf1af77a152abf4b543e398d6ddf0af1594423473
[llvm-objdump] Add RAII for xar apis

Summary:
xar_open and xar_iter_new require manual calls to close/free functions
to deallocate resources. This makes it easy to introduce memory leaks,
so add RAII struct wrappers for these resources.

Reviewers: enderby, rafael, compnerd, lhames, dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315069 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-objdump/MachODump.cpp