[cfe-dev] Attribute 'nodebug' on variables

Robinson, Paul via cfe-dev cfe-dev at lists.llvm.org
Thu Apr 14 14:50:12 PDT 2016

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


More information about the cfe-dev mailing list