Page MenuHomePhabricator

[lldb] Remove checks behind LLDB_CONFIGURATION_DEBUG from TypeSystemClang

Authored by teemperor on Feb 27 2020, 11:13 PM.



This function is (supposed) to be a list of asserts that just do a generic sanity check
on declarations we return. Right now this function is hidden behind the
LLDB_CONFIGURATION_DEBUG macro which means it will *only* be run in
debug builds (but not Release+assert builds and so on).

As we have not a single CI running in Debug build, failures in VerifyDecl are hidden
from us until someone by accident executes the tests in Debug mode on their own machine.

This patch removes the ifdef's for LLDB_CONFIGURATION_DEBUG and puts
the getAccess() call in VerifyDecl behind a #ifndef NDEBUG to make sure
that this function is just an empty function with internal linkage when NDEBUG
is defined (so compilers should just optimize away the calls to it).

Diff Detail

Event Timeline

teemperor created this revision.Feb 27 2020, 11:13 PM
aprantl accepted this revision.Feb 28 2020, 8:58 AM

Great! You might want to do a git grep for LLDB_CONFIGURATION_DEBUG to find other instances, too.

This revision is now accepted and ready to land.Feb 28 2020, 8:58 AM
This revision was automatically updated to reflect the committed changes.