diff options
| author | Kostya Serebryany <kcc@google.com> | 2014-12-17 21:51:07 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2014-12-17 21:51:07 +0000 |
| commit | 4de56ef736fedb64d059fa6a922abd10b5f18690 (patch) | |
| tree | 6b3840cd5ec1a7270b0fb0f5c422050482cb3afe /compiler-rt/lib | |
| parent | fea4fb404eb5234742dd30c3ea662b9f72b38931 (diff) | |
| download | bcm5719-llvm-4de56ef736fedb64d059fa6a922abd10b5f18690.tar.gz bcm5719-llvm-4de56ef736fedb64d059fa6a922abd10b5f18690.zip | |
[sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, compiler-rt part
llvm-svn: 224464
Diffstat (limited to 'compiler-rt/lib')
| -rw-r--r-- | compiler-rt/lib/lsan/lsan.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/lib/lsan/lsan.cc b/compiler-rt/lib/lsan/lsan.cc index 1598fcac4a7..9a3314f3801 100644 --- a/compiler-rt/lib/lsan/lsan.cc +++ b/compiler-rt/lib/lsan/lsan.cc @@ -52,6 +52,12 @@ extern "C" void __lsan_init() { if (common_flags()->detect_leaks && common_flags()->leak_check_at_exit) Atexit(DoLeakCheck); + + if (common_flags()->coverage) { + __sanitizer_cov_init(); + Atexit(__sanitizer_cov_dump); + } + lsan_inited = true; lsan_init_is_running = false; } |

