diff options
author | Xinliang David Li <davidxl@google.com> | 2016-05-14 03:16:47 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-05-14 03:16:47 +0000 |
commit | e0848a54e50a6acf4dc28d025a8b2aa125ccf066 (patch) | |
tree | 5470ca9973590ef825a6462881396c8fa6329bd9 /lib/profile/InstrProfilingWriter.c | |
parent | 6a0541dbfac71086b98f96b1140eed0146876604 (diff) |
minor cleanup -- reset buffer pointer
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingWriter.c')
-rw-r--r-- | lib/profile/InstrProfilingWriter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/profile/InstrProfilingWriter.c b/lib/profile/InstrProfilingWriter.c index db944e20f..808ed62a1 100644 --- a/lib/profile/InstrProfilingWriter.c +++ b/lib/profile/InstrProfilingWriter.c @@ -59,8 +59,11 @@ lprofCreateBufferIO(WriterCallback FileWriter, void *File) { } COMPILER_RT_VISIBILITY void lprofDeleteBufferIO(ProfBufferIO *BufferIO) { - if (DynamicBufferIOBuffer) + if (DynamicBufferIOBuffer) { + DynamicBufferIOBuffer = 0; + VPBufferSize = 0; FreeHook(DynamicBufferIOBuffer); + } } COMPILER_RT_VISIBILITY int |