[cfe-dev] Attribute 'nodebug' on variables

Robinson, Paul via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 26 16:21:07 PDT 2016

Hearing no objections, I've posted a patch at http://reviews.llvm.org/D19567

| Can you update include/clang/Basic/AttrDocs.td ?
Yep, it's in the patch.

From: Sean Silva [mailto:chisophugis at gmail.com]
Sent: Thursday, April 14, 2016 8:37 PM
To: Robinson, Paul
Cc: cfe-dev at lists.llvm.org
Subject: Re: [cfe-dev] Attribute 'nodebug' on variables

On Thu, Apr 14, 2016 at 2:50 PM, Robinson, Paul via cfe-dev <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>> wrote:
The 'nodebug' attribute is allowed on functions; it suppresses debug
info for that function (no surprise there).  This includes both the
function itself and any inlined instances.

The 'nodebug' attribute is allowed on global/static variables; however,
the effect is to suppress debug info for the associated initializer
function, if any.  Debug info for the variable itself is unaffected.

I'd like to make it suppress debug info for the variable itself.
Anyone have an objection?

Background info:
The 'nodebug' attribute appears to be a Clang invention; I don't see any
gcc documentation for it, and can't persuade gcc to accept it.  So, what
it means is pretty much up to Clang, AFAICT.

(I don't see any *Clang* documentation for 'nodebug' either, which is a
separate problem.)

Can you update include/clang/Basic/AttrDocs.td ?

(which becomes http://clang.llvm.org/docs/AttributeReference.html)

-- Sean Silva


cfe-dev mailing list
cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160426/0ff6a254/attachment.html>

More information about the cfe-dev mailing list