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)
commitaed187c76e884dcb96e55312c16e1335580a2ed9
tree246aff885ca1735092fbbe00d61e71c553b9543b
parent1e02a5aac82a41db5092998349f2fc4de459da19
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.

llvm-svn: 240701
llvm/tools/dsymutil/DwarfLinker.cpp