/// destroyed.
llvm::SmallVector<llvm::sys::Path, 4> TemporaryFiles;
-#ifndef NDEBUG
+#ifdef _DEBUG
/// \brief Simple hack to allow us to assert that ASTUnit is not being
/// used concurrently, which is not supported.
///
public:
class ConcurrencyCheck {
-#ifndef NDEBUG
+#ifdef _DEBUG
volatile ASTUnit &Self;
#endif
public:
explicit ConcurrencyCheck(ASTUnit &Self)
-#ifndef NDEBUG
+#ifdef _DEBUG
: Self(Self)
#endif
{
-#ifndef NDEBUG
+#ifdef _DEBUG
assert(Self.ConcurrencyCheckValue == CheckUnlocked &&
"Concurrent access to ASTUnit!");
Self.ConcurrencyCheckValue = CheckLocked;
#endif
}
-#ifndef NDEBUG
+#ifdef _DEBUG
~ConcurrencyCheck() {
Self.ConcurrencyCheckValue = CheckUnlocked;
}
: MainFileIsAST(_MainFileIsAST), ConcurrencyCheckValue(CheckUnlocked) {
}
ASTUnit::~ASTUnit() {
-#ifndef NDEBUG
+#ifdef _DEBUG
ConcurrencyCheckValue = CheckLocked;
#endif
for (unsigned I = 0, N = TemporaryFiles.size(); I != N; ++I)