[llvm-commits] [compiler-rt] r157567 - /compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
Dmitry Vyukov
dvyukov at google.com
Mon May 28 00:45:41 PDT 2012
Author: dvyukov
Date: Mon May 28 02:45:35 2012
New Revision: 157567
URL: http://llvm.org/viewvc/llvm-project?rev=157567&view=rev
Log:
tsan: use DCHECK_GT/LT instead of plain DCHECK (better diagnostics)
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=157567&r1=157566&r2=157567&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Mon May 28 02:45:35 2012
@@ -443,8 +443,8 @@
// Shadow stack maintenance can be replaced with
// stack unwinding during trace switch (which presumably must be faster).
- DCHECK(thr->shadow_stack_pos >= &thr->shadow_stack[0]);
- DCHECK(thr->shadow_stack_pos < &thr->shadow_stack[kShadowStackSize]);
+ DCHECK_GE(thr->shadow_stack_pos, &thr->shadow_stack[0]);
+ DCHECK_LT(thr->shadow_stack_pos, &thr->shadow_stack[kShadowStackSize]);
thr->shadow_stack_pos[0] = pc;
thr->shadow_stack_pos++;
}
@@ -456,8 +456,8 @@
thr->fast_state.IncrementEpoch();
TraceAddEvent(thr, thr->fast_state.epoch(), EventTypeFuncExit, 0);
- DCHECK(thr->shadow_stack_pos > &thr->shadow_stack[0]);
- DCHECK(thr->shadow_stack_pos < &thr->shadow_stack[kShadowStackSize]);
+ DCHECK_GT(thr->shadow_stack_pos, &thr->shadow_stack[0]);
+ DCHECK_LT(thr->shadow_stack_pos, &thr->shadow_stack[kShadowStackSize]);
thr->shadow_stack_pos--;
}
More information about the llvm-commits
mailing list