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 | 4223af42b8f3fbb5eae4d1b531ccccbe12d06aa2 (patch) | |
| tree | b60020275e61ebe54616c7e3e0918a1bd9f3417d /compiler-rt/lib/scudo/scudo_flags.cpp | |
| parent | 1d531013876c02b18df678a5f67d6a7d94e392b9 (diff) | |
| download | bcm5719-llvm-4223af42b8f3fbb5eae4d1b531ccccbe12d06aa2.tar.gz bcm5719-llvm-4223af42b8f3fbb5eae4d1b531ccccbe12d06aa2.zip | |
[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
llvm-svn: 323795
Diffstat (limited to 'compiler-rt/lib/scudo/scudo_flags.cpp')
| -rw-r--r-- | compiler-rt/lib/scudo/scudo_flags.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler-rt/lib/scudo/scudo_flags.cpp b/compiler-rt/lib/scudo/scudo_flags.cpp index 2aff3ef1e8f..ad50800c473 100644 --- a/compiler-rt/lib/scudo/scudo_flags.cpp +++ b/compiler-rt/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 |

