[lldb] Remove checks behind LLDB_CONFIGURATION_DEBUG from TypeSystemClang
authorRaphael Isemann <teemperor@gmail.com>
Mon, 2 Mar 2020 18:24:59 +0000 (10:24 -0800)
committerRaphael Isemann <teemperor@gmail.com>
Mon, 2 Mar 2020 18:57:56 +0000 (10:57 -0800)
commit69d2b675562cfce71882023874b6aead94107f97
tree3ee3aeb6e6fca4a4070fbf3eabb6561536a32f03
parent02c154a9cb7f81d6bffe2326104e8d19980f2dd5
[lldb] Remove checks behind LLDB_CONFIGURATION_DEBUG from TypeSystemClang

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

Reviewers: aprantl

Reviewed By: aprantl

Subscribers: shafik, abidh, JDevlieghere, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D75330
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp