[compiler-rt] r314878 - [XRay][compiler-rt] Fix logical failure in BufferQueue::getBuffer()
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 23:02:12 PDT 2017
Author: dberris
Date: Tue Oct 3 23:02:12 2017
New Revision: 314878
URL: http://llvm.org/viewvc/llvm-project?rev=314878&view=rev
Log:
[XRay][compiler-rt] Fix logical failure in BufferQueue::getBuffer()
Follow-up to D38119.
Modified:
compiler-rt/trunk/lib/xray/xray_buffer_queue.cc
Modified: compiler-rt/trunk/lib/xray/xray_buffer_queue.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_buffer_queue.cc?rev=314878&r1=314877&r2=314878&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_buffer_queue.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_buffer_queue.cc Tue Oct 3 23:02:12 2017
@@ -55,7 +55,6 @@ BufferQueue::ErrorCode BufferQueue::getB
Buf = B;
++LiveBuffers;
- First = Next;
if (++Next == (Buffers.get() + BufferCount))
Next = Buffers.get();
@@ -81,6 +80,7 @@ BufferQueue::ErrorCode BufferQueue::rele
--LiveBuffers;
if (++First == (Buffers.get() + BufferCount))
First = Buffers.get();
+
return ErrorCode::Ok;
}
More information about the llvm-commits
mailing list