]> granicus.if.org Git - clang/commitdiff
Switch from NDEBUG to _DEBUG, since our Windows build is funny
authorDouglas Gregor <dgregor@apple.com>
Fri, 5 Mar 2010 21:48:53 +0000 (21:48 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 5 Mar 2010 21:48:53 +0000 (21:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97835 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/ASTUnit.h
lib/Frontend/ASTUnit.cpp

index dca71cffecaf4f3f9fdd526ba3223cb8328c539e..70a1b2bb16255d84a5f51ac0b32d8ae5c68a73d0 100644 (file)
@@ -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;
     }
index 4ea1ccc943b6bc4dbee52c6997b6062aafbcd51e..3bf5f796c43e53df10b9590157e9b1a31413fd24 100644 (file)
@@ -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)