dsymutil: Split out patchStmtList(), NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 25 Jun 2015 21:42:46 +0000 (21:42 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 25 Jun 2015 21:42:46 +0000 (21:42 +0000)
commitee46b796c24d094130d55572421b22a5837b3e5c
tree99baca89fbafc43810b32bb27a0cb4bb0ebb1bc5
parent7db079305c20db79736f9af1405c7752b8dd6bfc
dsymutil: Split out patchStmtList(), NFC

Split out code to patch up the `DW_AT_stmt_list` for the cloned DIE, and
reorganize it so that it doesn't depend on `DIE::values_begin()` and
`DIE::values_end()` (which I'm trying to kill off).

David Blaikie and I talked about adding a range-algorithm version of
`std::find_if()`, but the assertion *still* required getting at the end
iterator.  IMO, a separate helper function with an early return is
easier to reason about here.

A follow-up commit that removes `DIE::setValue()` and mutates the
`DIEValue` directly is coming shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240701 91177308-0d34-0410-b5e6-96231b3b80d8
tools/dsymutil/DwarfLinker.cpp