<div dir="ltr">Adding a vtable to DIE's probably not OK - memory usage there is, I think, a bit of a concern.<br><br>Adrian - thoughts on where this check might be best placed? It'd seem best to make sure it fails at the time the attribute is added to the DIE, rather than during a later walk - but sure, no big deal, probably doesn't come up all that often/not /too/ painful to debug (look at the attribute type, the DIE memory address, set a conditional breakpoint on DIEValueList::addValue & run again). <br><br>There's a relatively small handful of functions that benefit from this generality, and it might be easy enough to split them (might not be, too) - given that the generality is over blocks and locations that don't have attribute kinds - they're not very much the same thing.... dunno though.<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 11, 2017 at 4:22 PM Paul Robinson 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">probinson updated this revision to Diff 94905.<br class="gmail_msg">
probinson added a comment.<br class="gmail_msg">
<br class="gmail_msg">
Move the version check to DIE::addValue().  This required making the base-class method virtual, because the base class doesn't have a way to find the DWARF version; only a DIE can do that.<br class="gmail_msg">
Other review comments addressed as well.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D30785" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D30785</a><br class="gmail_msg">
<br class="gmail_msg">
Files:<br class="gmail_msg">
  include/llvm/CodeGen/DIE.h<br class="gmail_msg">
  include/llvm/ObjectYAML/DWARFYAML.h<br class="gmail_msg">
  include/llvm/Support/Dwarf.def<br class="gmail_msg">
  include/llvm/Support/Dwarf.h<br class="gmail_msg">
  lib/CodeGen/AsmPrinter/DIE.cpp<br class="gmail_msg">
  lib/Support/Dwarf.cpp<br class="gmail_msg">
  test/DebugInfo/AMDGPU/pointer-address-space-dwarf-v1.ll<br class="gmail_msg">
  test/DebugInfo/AMDGPU/variable-locations-dwarf-v1.ll<br class="gmail_msg">
  tools/dsymutil/DwarfLinker.cpp<br class="gmail_msg">
  unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div>