<div dir="ltr">After spending some time parallel debugging Clang and GCC I've been frustrated by Clang's use of raw integer types for form/tag/etc (compared to GCC which uses specific enum types for those variables - making it easier to print their textual or integer values as needed, rather than only the integer values).<br>
<br>To improve this, here's a patch that separates out the dwarf constants into separate groups, named the same as GCC's (for want of any better names) and uses them in the lib/CodeGen/AsmPrinter Dwarf handling code.<br>
<br>Probably the major debatable portion of this is how we handle DWARF blocks. They're treated as DIEs and have attributes added to them. Generally those attributes have no attribute type (using zero) - since that's not a valid DWARF attribute kind number the code didn't compile anymore. I could've added casts all over the place but instead opted to put a few wrapper functions to make it a bit more type safe - such that the attribute can be omitted for certain 'add' operations but only if the DIE is actually a block. <br>
<br>I don't really know enough to understand whether it makes sense for blocks to be DIEs or how we should handle their attributes not having attribute types here, so I figured I'd throw this out there in case I'm missing something here.</div>