diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-05 22:19:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-05 22:19:41 +0000 |
commit | 667514d92afd1485765cb4e2bbe452883adc989b (patch) | |
tree | 1de0d5d44389dc1faf6ccd9d82cebbe0187e2784 | |
parent | 12312b807e7c00504c2e5b3b5e2d11bfbca4b8d8 (diff) |
The Windows build is just too weird; there's no real cost to doing the concurrency checks for ASTUnit in all builds
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97840 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Frontend/ASTUnit.h | 10 | ||||
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 2 |
2 files changed, 0 insertions, 12 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 70a1b2bb16..7f11c85ae3 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -89,7 +89,6 @@ class ASTUnit { /// destroyed. llvm::SmallVector<llvm::sys::Path, 4> TemporaryFiles; -#ifdef _DEBUG /// \brief Simple hack to allow us to assert that ASTUnit is not being /// used concurrently, which is not supported. /// @@ -99,35 +98,26 @@ class ASTUnit { unsigned int ConcurrencyCheckValue; static const unsigned int CheckLocked = 28573289; static const unsigned int CheckUnlocked = 9803453; -#endif ASTUnit(const ASTUnit&); // DO NOT IMPLEMENT ASTUnit &operator=(const ASTUnit &); // DO NOT IMPLEMENT public: class ConcurrencyCheck { -#ifdef _DEBUG volatile ASTUnit &Self; -#endif public: explicit ConcurrencyCheck(ASTUnit &Self) -#ifdef _DEBUG : Self(Self) -#endif { -#ifdef _DEBUG assert(Self.ConcurrencyCheckValue == CheckUnlocked && "Concurrent access to ASTUnit!"); Self.ConcurrencyCheckValue = CheckLocked; -#endif } -#ifdef _DEBUG ~ConcurrencyCheck() { Self.ConcurrencyCheckValue = CheckUnlocked; } -#endif }; friend class ConcurrencyCheck; diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 3bf5f796c4..63cf98d3da 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -39,9 +39,7 @@ ASTUnit::ASTUnit(bool _MainFileIsAST) : MainFileIsAST(_MainFileIsAST), ConcurrencyCheckValue(CheckUnlocked) { } ASTUnit::~ASTUnit() { -#ifdef _DEBUG ConcurrencyCheckValue = CheckLocked; -#endif for (unsigned I = 0, N = TemporaryFiles.size(); I != N; ++I) TemporaryFiles[I].eraseFromDisk(); } |