Make ASTUnit structure stable with NDEBUG

ASTUnit instances are allocated infrequently so it's fine to keep this field
around in all build configurations.

Assigns null to silence -Wunused-private-field in Release.

llvm-svn: 195419
This commit is contained in:
Alp Toker 2013-11-22 07:49:39 +00:00
parent 298c3403d2
commit b159c13d11
2 changed files with 1 additions and 3 deletions

View File

@ -406,9 +406,7 @@ private:
/// just about any usage.
/// Becomes a noop in release mode; only useful for debug mode checking.
class ConcurrencyState {
#ifndef NDEBUG
void *Mutex; // a llvm::sys::MutexImpl in debug;
#endif
public:
ConcurrencyState();

View File

@ -2953,7 +2953,7 @@ void ASTUnit::ConcurrencyState::finish() {
#else // NDEBUG
ASTUnit::ConcurrencyState::ConcurrencyState() {}
ASTUnit::ConcurrencyState::ConcurrencyState() { Mutex = 0; }
ASTUnit::ConcurrencyState::~ConcurrencyState() {}
void ASTUnit::ConcurrencyState::start() {}
void ASTUnit::ConcurrencyState::finish() {}