[cfe-commits] [PATCH] Add _Atomic specifier for atomic types

Cary Coutant ccoutant at google.com
Tue Oct 4 18:47:55 PDT 2011


[I meant to reply-all, sorry]

> >> Index: lib/CodeGen/CGDebugInfo.cpp
> >> ===================================================================
> >> --- lib/CodeGen/CGDebugInfo.cpp       (revision 141016)
> >> +++ lib/CodeGen/CGDebugInfo.cpp       (working copy)
> >> @@ -1418,6 +1418,13 @@
> >>                                     0, 0, Elements);
> >>  }
> >>
> >> +llvm::DIType CGDebugInfo::CreateType(const AtomicType *Ty,
> >> +                                     llvm::DIFile U) {
> >> +  // Ignore the atomic wrapping
> >> +  // FIXME: What is the correct representation?
> >
> > Cary Coutant suggests adding a DW_TAG_atomic_type node with a child
> > node pointing at the value type, similar to DW_TAG_const_type, etc.
> > Then extra alignment, size, etc. information can be attached to the
> > DW_TAG_atomic_type node. He's going to bring this up with the Dwarf
> > committee and let us know what they say.
>
> Okay; please keep me up-to-date.

I've started a discussion in the DWARF workgroup; so far it seems that
no one else has started to address this issue. My tentative proposal
to add DW_TAG_atomic_type, similar to DW_TAG_volatile, DW_TAG_const,
et al., seems to the most natural approach. I'll wait a bit for more
discussion, and then write up a real proposal and see if we can
reserve a TAG value that you can use. (For now, if you want, the next
available DW_TAG value is 0x44, so that's the most likely value.) If
the atomic type has different size from the base type that it
modifies, I'm going to suggest that DW_AT_byte_size attribute on the
DW_TAG_atomic_type would be appropriate.

If you have any other questions about the DWARF representation, please
let me know so I can make sure they're all covered in the DWARF
proposal.

-cary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111004/fc3ce86b/attachment.html>


More information about the cfe-commits mailing list