[PATCH] D14687: Macro support in LLVM IR

Paul Robinson via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 18:50:22 PST 2015


probinson added a comment.

In http://reviews.llvm.org/D14687#304960, @aaboud wrote:

> In http://reviews.llvm.org/D14687#304938, @aprantl wrote:
>
> > The only concern I've got with this is whether we shouldn't future-proof this by using the DWARF5-style DW_MACRO_.* constants internally, since the old ones aren't even defined in the DWARF5 standard document any more and thus might be harder to find documentation for.
>


Older versions of the DWARF spec will remain available; dwarfstd.org has them back to 1.1.  I'm not concerned about the constant names becoming unavailable.
On the contrary, the DWARF 5 constants aren't officially defined/published yet, and using them is speculative.  I'd prefer to see DW_MACINFO for now, and add DW_MACRO later.

> > Context: In DWARF5 ( http://dwarfstd.org/ShowIssue.php?issue=110722.1 ) the DW_MACINFO_.* constants will be renamed to DW_MACRO_*. This will be fun to implement in dwarfdump because the same numeric value has different names depending on the DWARF version.

> 


Yeah... reading the data from the object file will be unambiguous (different section name) but pretty printing it might get kind of tedious.

> Thanks Adrian for the comment.

>  I understand your concern, but I think it is not related to this patch of macro support in LLVM IR.

>  I intentionally, split code into several parts, so the concern can be raised only on the problematic ones.

> 

> Do you think that this patch might not fit DWARF5?


Conveying the macro data from the frontend through the IR should work the same way for either, I'd guess. DWARF 5 will have differences in detail of emitting the data into the object file and that will probably have to be done separately anyway.


Repository:
  rL LLVM

http://reviews.llvm.org/D14687





More information about the llvm-commits mailing list