Attribute 'nodebug' on variables

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.)

Thanks,
--paulr

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 Attributes in Clang — Clang 16.0.0git documentation)

-- Sean Silva

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.

–paulr