[PATCH] [asan] LSan hooks in asan_rtl
Kostya Serebryany
kcc at google.com
Tue May 21 00:49:35 PDT 2013
- #ifdefs are evil, please try to minimize them
- we need to find a better name for the flag.
================
Comment at: lib/asan/asan_flags.h:112
@@ -111,1 +111,3 @@
+ // Invoke LeakSanitizer at process exit.
+ bool sanitize_leaks;
};
----------------
maybe find_leaks or check_leaks or just leaks?
================
Comment at: lib/asan/asan_rtl.cc:191
@@ +190,3 @@
+
+#if SANITIZE_LEAKS
+ if (f->sanitize_leaks && !f->use_stack_depot) {
----------------
why #if ?
================
Comment at: lib/asan/asan_rtl.cc:462
@@ -450,1 +461,3 @@
+#if SANITIZE_LEAKS
+ if (flags()->sanitize_leaks) {
----------------
why #if ?
================
Comment at: lib/asan/asan_rtl.cc:547
@@ -529,1 +546,3 @@
+#ifdef SANITIZE_LEAKS
+ __lsan::InitCommonLsan();
----------------
Why #if?
http://llvm-reviews.chandlerc.com/D831
More information about the llvm-commits
mailing list