diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-05 21:48:53 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-05 21:48:53 +0000 |
commit | 1e1973c0ebc5d2e17065c54f45ace43f7fa00d1a (patch) | |
tree | 4ab45c0b2c575de81f6aea8ca128c3bf387d3da1 | |
parent | 554e13efc63ad8fd37f7ee7fa2b066aa4d2ecec1 (diff) | |
download | bcm5719-llvm-1e1973c0ebc5d2e17065c54f45ace43f7fa00d1a.tar.gz bcm5719-llvm-1e1973c0ebc5d2e17065c54f45ace43f7fa00d1a.zip |
Switch from NDEBUG to _DEBUG, since our Windows build is funny
llvm-svn: 97835
-rw-r--r-- | clang/include/clang/Frontend/ASTUnit.h | 10 | ||||
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/include/clang/Frontend/ASTUnit.h b/clang/include/clang/Frontend/ASTUnit.h index dca71cffeca..70a1b2bb162 100644 --- a/clang/include/clang/Frontend/ASTUnit.h +++ b/clang/include/clang/Frontend/ASTUnit.h @@ -89,7 +89,7 @@ class ASTUnit { /// 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. /// @@ -106,24 +106,24 @@ class ASTUnit { 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; } diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 4ea1ccc943b..3bf5f796c43 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -39,7 +39,7 @@ ASTUnit::ASTUnit(bool _MainFileIsAST) : MainFileIsAST(_MainFileIsAST), ConcurrencyCheckValue(CheckUnlocked) { } ASTUnit::~ASTUnit() { -#ifndef NDEBUG +#ifdef _DEBUG ConcurrencyCheckValue = CheckLocked; #endif for (unsigned I = 0, N = TemporaryFiles.size(); I != N; ++I) |