[compiler-rt] r225110 - Replace DCHECK with DCHECK_LE where appropriate.

Alexey Samsonov vonosmas at gmail.com
Fri Jan 2 20:29:05 PST 2015


Author: samsonov
Date: Fri Jan  2 22:29:05 2015
New Revision: 225110

URL: http://llvm.org/viewvc/llvm-project?rev=225110&view=rev
Log:
Replace DCHECK with DCHECK_LE where appropriate.

Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_clock.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_clock.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_clock.cc?rev=225110&r1=225109&r2=225110&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_clock.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_clock.cc Fri Jan  2 22:29:05 2015
@@ -104,8 +104,8 @@ ThreadClock::ThreadClock(unsigned tid, u
 }
 
 void ThreadClock::acquire(ClockCache *c, const SyncClock *src) {
-  DCHECK(nclk_ <= kMaxTid);
-  DCHECK(src->size_ <= kMaxTid);
+  DCHECK_LE(nclk_, kMaxTid);
+  DCHECK_LE(src->size_, kMaxTid);
   CPP_STAT_INC(StatClockAcquire);
 
   // Check if it's empty -> no need to do anything.
@@ -215,8 +215,8 @@ void ThreadClock::release(ClockCache *c,
 }
 
 void ThreadClock::ReleaseStore(ClockCache *c, SyncClock *dst) const {
-  DCHECK(nclk_ <= kMaxTid);
-  DCHECK(dst->size_ <= kMaxTid);
+  DCHECK_LE(nclk_, kMaxTid);
+  DCHECK_LE(dst->size_, kMaxTid);
   CPP_STAT_INC(StatClockStore);
 
   // Check if we need to resize dst.





More information about the llvm-commits mailing list