<div dir="ltr">I'm not sure optional error handling's ideal - seems errors should always be handled (which is the strong premise behind Lang's work introducing llvm::Error).</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 9, 2017 at 2:21 PM Greg Clayton via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">clayborg updated this revision to Diff 83698.<br class="gmail_msg">
clayborg added a comment.<br class="gmail_msg">
<br class="gmail_msg">
Added optional error handling to the attributes iterators. You can now pass an "llvm::Error *" to the attributes():<br class="gmail_msg">
<br class="gmail_msg">
  attribute_iterator DWARFDie::attributes(llvm::Error *Err);<br class="gmail_msg">
<br class="gmail_msg">
If the error is non-NULL, then the error will be filled in. This iteration error is the same method used in Archive.h/Archive.cpp after I spoke with Lang Hames.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D28386" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28386</a><br class="gmail_msg">
<br class="gmail_msg">
Files:<br class="gmail_msg">
  include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h<br class="gmail_msg">
  include/llvm/DebugInfo/DWARF/DWARFAttribute.h<br class="gmail_msg">
  include/llvm/DebugInfo/DWARF/DWARFDie.h<br class="gmail_msg">
  lib/DebugInfo/DWARF/DWARFDie.cpp<br class="gmail_msg">
  unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>