<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 21, 2013 at 10:15 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Mon, Oct 21, 2013 at 9:53 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>

> After spending some time parallel debugging Clang and GCC I've been<br>
> frustrated by Clang's use of raw integer types for form/tag/etc (compared to<br>
> GCC which uses specific enum types for those variables - making it easier to<br>
> print their textual or integer values as needed, rather than only the<br>
> integer values).<br>
><br>
> To improve this, here's a patch that separates out the dwarf constants into<br>
> separate groups, named the same as GCC's (for want of any better names) and<br>
> 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.<br>
> They're treated as DIEs and have attributes added to them. Generally those<br>
> attributes have no attribute type (using zero) - since that's not a valid<br>
> DWARF attribute kind number the code didn't compile anymore. I could've<br>
> added casts all over the place but instead opted to put a few wrapper<br>
> functions to make it a bit more type safe - such that the attribute can be<br>
> omitted for certain 'add' operations but only if the DIE is actually a<br>
> block.<br>
><br>
> I don't really know enough to understand whether it makes sense for blocks<br>
> to be DIEs or how we should handle their attributes not having attribute<br>
> types here, so I figured I'd throw this out there in case I'm missing<br>
> something here.<br>
<br>
</div></div>I don't really know that blocks need to be DIEs, mostly they want to<br>
be tuples/lists of some sort. We're just using DIEs to represent the<br>
"it's a form and a length and some stuff".<br></blockquote><div><br></div><div>OK - I'll keep that in mind for the future.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
It's a great step though so thanks.<br></blockquote><div><br></div><div>Thanks - committed as r<span style="font-family:monospace">193091.</span></div></div></div></div>