diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2018-01-30 17:59:49 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2018-01-30 17:59:49 +0000 |
commit | a9aa2e1be2a14088a26281b172ba51889bd10ef6 (patch) | |
tree | f8b99982aa75dff084aac927ae4c22d0837fad2a /lib/scudo/scudo_flags.cpp | |
parent | bc8316b265e5ed082ec3fc9e015f1f3e5db80623 (diff) | |
download | compiler-rt-a9aa2e1be2a14088a26281b172ba51889bd10ef6.tar.gz |
[scudo] Add default implementations for weak functions
Summary:
This is in preparation for platforms where `SANITIZER_SUPPORTS_WEAK_HOOKS` is 0.
They require a default implementation.
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D42557
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@323795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo/scudo_flags.cpp')
-rw-r--r-- | lib/scudo/scudo_flags.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/scudo/scudo_flags.cpp b/lib/scudo/scudo_flags.cpp index 2aff3ef1e..ad50800c4 100644 --- a/lib/scudo/scudo_flags.cpp +++ b/lib/scudo/scudo_flags.cpp @@ -12,13 +12,12 @@ //===----------------------------------------------------------------------===// #include "scudo_flags.h" +#include "scudo_interface_internal.h" #include "scudo_utils.h" #include "sanitizer_common/sanitizer_flags.h" #include "sanitizer_common/sanitizer_flag_parser.h" -SANITIZER_INTERFACE_WEAK_DEF(const char*, __scudo_default_options, void); - namespace __scudo { static Flags ScudoFlags; // Use via getFlags(). @@ -119,3 +118,9 @@ Flags *getFlags() { } } // namespace __scudo + +#if !SANITIZER_SUPPORTS_WEAK_HOOKS +SANITIZER_INTERFACE_WEAK_DEF(const char*, __scudo_default_options, void) { + return ""; +} +#endif |