[PATCH] D34210: Add __has_feature(leak_sanitizer)
Maxim Ostapenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 14 11:14:40 PDT 2017
m.ostapenko added a comment.
In https://reviews.llvm.org/D34210#780520, @fjricci wrote:
> Currently, the way that we tell users to gate on sanitizer-specific behavior is with `__has_feature(foo_sanitizer)`, as far as I know, it's the only way to do so. LSan provides several API functions for users, ie `__lsan_ignore_object`. If a user program wants to use these API functions in their program, they need a way to check that LSan is enabled at compilation time (even if LSan doesn't actually modify the compile step). I'm not sure of a better or more consistent way to allow that to happen.
Can't you use weak hooks in your code for this purpose?
More information about the cfe-commits