[LSan] Add the way to disable LSan at link time
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185066 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/sanitizer/lsan_interface.h b/include/sanitizer/lsan_interface.h
index c826323..97a88a5 100644
--- a/include/sanitizer/lsan_interface.h
+++ b/include/sanitizer/lsan_interface.h
@@ -25,6 +25,10 @@
void __lsan_enable();
// The heap object into which p points will be treated as a non-leak.
void __lsan_ignore_object(const void *p);
+ // The user may optionally provide this function to disallow leak checking
+ // for the program it is linked into. Note: this function may be called late,
+ // after all the global destructors.
+ int __lsan_is_turned_off();
#ifdef __cplusplus
} // extern "C"