[PATCH] D30377: [DebugInfo] [DWARFv5] Support for DW_AT_calling_convention for types

Robinson, Paul via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 11:25:12 PST 2017


Yes, addFlag() does choose what to do based on version, and something like that for implicit const would work.  The fallback would use a regular addSInt().

From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf Of David Blaikie via llvm-commits
Sent: Tuesday, February 28, 2017 5:05 PM
To: reviews+D30377+public+7bf5043b5c30d2d5 at reviews.llvm.org; vleschuk at accesssoftek.com; mehdi.amini at apple.com; echristo at gmail.com; aprantl at apple.com
Cc: llvm-commits at lists.llvm.org
Subject: Re: [PATCH] D30377: [DebugInfo] [DWARFv5] Support for DW_AT_calling_convention for types

We'll probably want to add a generic function that can choose between implicit_const and  a DWARF4 form - because we'll probably want to use implicit_const for existing attributes (like accessibility, etc). How do we handle form_present? I think we have a high level "add Flag" operation that uses form_present or something backwards compatible depending on the target DWARF verison)

On Tue, Feb 28, 2017 at 3:26 PM Paul Robinson via Phabricator <reviews at reviews.llvm.org<mailto:reviews at reviews.llvm.org>> wrote:
probinson added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:973
+    // Add DW_AT_calling_convention attr.
+    if (DD->getDwarfVersion() >= 5) {
+      auto ArgABI = CTy->getArgABI();
----------------
aprantl wrote:
> Technically true, but I think there is no harm in emitting this attribute also in DWARF 4 or earlier. We usually only do this if the new attribute cannot be safely ignored by an older consumer.
Actually DW_FORM_implicit_const is new in DWARF 5, and new FORMs cannot be used in prior-version DIEs.  So, either we have to guard the entire attribute, or we have to conditionalize the FORM.


https://reviews.llvm.org/D30377


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170301/9bd4ffdb/attachment.html>


More information about the llvm-commits mailing list