From 4cdf4eba74df1c2a679931716fc630fd484bdb3c Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 1 Dec 2014 23:47:51 +0000 Subject: [PATCH] Add override specifiers to Symbolizer methods. NFC. llvm-svn: 223094 --- .../sanitizer_symbolizer_posix_libcdep.cc | 14 +++++++------- .../sanitizer_common/sanitizer_symbolizer_win.cc | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc index eb2b707ec3c6..e4c3f8d23bef 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc @@ -514,7 +514,7 @@ class POSIXSymbolizer : public Symbolizer { internal_symbolizer_(internal_symbolizer), libbacktrace_symbolizer_(libbacktrace_symbolizer) {} - uptr SymbolizePC(uptr addr, AddressInfo *frames, uptr max_frames) { + uptr SymbolizePC(uptr addr, AddressInfo *frames, uptr max_frames) override { BlockingMutexLock l(&mu_); if (max_frames == 0) return 0; @@ -582,7 +582,7 @@ class POSIXSymbolizer : public Symbolizer { return frame_id; } - bool SymbolizeData(uptr addr, DataInfo *info) { + bool SymbolizeData(uptr addr, DataInfo *info) override { BlockingMutexLock l(&mu_); LoadedModule *module = FindModuleForAddress(addr); if (module == 0) @@ -609,17 +609,17 @@ class POSIXSymbolizer : public Symbolizer { } bool GetModuleNameAndOffsetForPC(uptr pc, const char **module_name, - uptr *module_address) { + uptr *module_address) override { BlockingMutexLock l(&mu_); return FindModuleNameAndOffsetForAddress(pc, module_name, module_address); } - bool CanReturnFileLineInfo() { + bool CanReturnFileLineInfo() override { return internal_symbolizer_ != 0 || external_symbolizer_ != 0 || libbacktrace_symbolizer_ != 0; } - void Flush() { + void Flush() override { BlockingMutexLock l(&mu_); if (internal_symbolizer_ != 0) { SymbolizerScope sym_scope(this); @@ -627,7 +627,7 @@ class POSIXSymbolizer : public Symbolizer { } } - const char *Demangle(const char *name) { + const char *Demangle(const char *name) override { BlockingMutexLock l(&mu_); // Run hooks even if we don't use internal symbolizer, as cxxabi // demangle may call system functions. @@ -642,7 +642,7 @@ class POSIXSymbolizer : public Symbolizer { return DemangleCXXABI(name); } - void PrepareForSandboxing() { + void PrepareForSandboxing() override { #if SANITIZER_LINUX && !SANITIZER_ANDROID BlockingMutexLock l(&mu_); // Cache /proc/self/exe on Linux. diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc index e8cf0a8307e7..e60ab23b2f51 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc @@ -26,7 +26,7 @@ class WinSymbolizer : public Symbolizer { public: WinSymbolizer() : initialized_(false) {} - uptr SymbolizePC(uptr addr, AddressInfo *frames, uptr max_frames) { + uptr SymbolizePC(uptr addr, AddressInfo *frames, uptr max_frames) override { if (max_frames == 0) return 0; @@ -85,11 +85,11 @@ class WinSymbolizer : public Symbolizer { return 1; } - bool CanReturnFileLineInfo() { + bool CanReturnFileLineInfo() override { return true; } - const char *Demangle(const char *name) { + const char *Demangle(const char *name) override { CHECK(initialized_); static char demangle_buffer[1000]; if (name[0] == '\01' &&