[compiler-rt] f70963c - [NFC][sanitizer] Update comment in InternalSymbolizer::get
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 09:20:26 PDT 2023
Author: Vitaly Buka
Date: 2023-09-26T09:20:15-07:00
New Revision: f70963c69d0278e2b9d958196e72fb8cc5e9afde
URL: https://github.com/llvm/llvm-project/commit/f70963c69d0278e2b9d958196e72fb8cc5e9afde
DIFF: https://github.com/llvm/llvm-project/commit/f70963c69d0278e2b9d958196e72fb8cc5e9afde.diff
LOG: [NFC][sanitizer] Update comment in InternalSymbolizer::get
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
index 5cba86e39fa2839..724ad4722909f1e 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
@@ -337,12 +337,13 @@ __sanitizer_symbolize_set_inline_frames(bool InlineFrames);
class InternalSymbolizer final : public SymbolizerTool {
public:
static InternalSymbolizer *get(LowLevelAllocator *alloc) {
- if (__sanitizer_symbolize_set_demangle)
+ if (&__sanitizer_symbolize_set_demangle)
CHECK(__sanitizer_symbolize_set_demangle(common_flags()->demangle));
- if (__sanitizer_symbolize_set_inline_frames)
+ if (&__sanitizer_symbolize_set_inline_frames)
CHECK(__sanitizer_symbolize_set_inline_frames(
common_flags()->symbolize_inline_frames));
- if (__sanitizer_symbolize_code && __sanitizer_symbolize_data)
+ // These are essential, we don't have InternalSymbolizer without them.
+ if (&__sanitizer_symbolize_code && &__sanitizer_symbolize_data)
return new (*alloc) InternalSymbolizer();
return 0;
}
@@ -366,7 +367,7 @@ class InternalSymbolizer final : public SymbolizerTool {
}
void Flush() override {
- if (__sanitizer_symbolize_flush)
+ if (&__sanitizer_symbolize_flush)
__sanitizer_symbolize_flush();
}
More information about the llvm-commits
mailing list