Skip to content

Commit

Permalink
Merged master:98031b664c94 into amd-gfx:2931e6bc4ec5
Browse files Browse the repository at this point in the history
Local branch amd-gfx 2931e6b Merged master:dd6f7ee05e90 into amd-gfx:a8898f9cf70f
Remote branch master 98031b6 [polly] Fix -Wunused-lambda-capture and -Wunused-variable
  • Loading branch information
Sw authored and Sw committed Nov 3, 2020
2 parents 2931e6b + 98031b6 commit 9005424
Show file tree
Hide file tree
Showing 31 changed files with 231 additions and 142 deletions.
3 changes: 3 additions & 0 deletions compiler-rt/lib/memprof/memprof_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ struct MemprofThreadContext final : public ThreadContextBase {
MemprofThread *thread;
StackTrace *stack;
};

protected:
~MemprofThreadContext() {}
};

// MemprofThreadContext objects are never freed, so we need many of them.
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/msan/msan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void Flags::SetDefaults() {

// keep_going is an old name for halt_on_error,
// and it has inverse meaning.
class FlagHandlerKeepGoing : public FlagHandlerBase {
class FlagHandlerKeepGoing final : public FlagHandlerBase {
bool *halt_on_error_;

public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ struct DDCallback {

virtual u32 Unwind() { return 0; }
virtual int UniqueTid() { return 0; }

protected:
~DDCallback() {}
};

struct DDetector {
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FlagHandlerBase {
};

template <typename T>
class FlagHandler : public FlagHandlerBase {
class FlagHandler final : public FlagHandlerBase {
T *t_;

public:
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void SubstituteForFlagValue(const char *s, char *out, uptr out_size) {
*out = '\0';
}

class FlagHandlerInclude : public FlagHandlerBase {
class FlagHandlerInclude final : public FlagHandlerBase {
FlagParser *parser_;
bool ignore_missing_;
const char *original_path_;
Expand Down
7 changes: 5 additions & 2 deletions compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ class SuspendedThreadsList {
virtual uptr ThreadCount() const { UNIMPLEMENTED(); }
virtual tid_t GetThreadID(uptr index) const { UNIMPLEMENTED(); }

protected:
~SuspendedThreadsList() {}

private:
// Prohibit copy and assign.
SuspendedThreadsList(const SuspendedThreadsList&);
void operator=(const SuspendedThreadsList&);
SuspendedThreadsList(const SuspendedThreadsList &) = delete;
void operator=(const SuspendedThreadsList &) = delete;
};

typedef void (*StopTheWorldCallback)(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

namespace __sanitizer {

class SuspendedThreadsListLinux : public SuspendedThreadsList {
class SuspendedThreadsListLinux final : public SuspendedThreadsList {
public:
SuspendedThreadsListLinux() { thread_ids_.reserve(1024); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ typedef struct {
thread_t thread;
} SuspendedThreadInfo;

class SuspendedThreadsListMac : public SuspendedThreadsList {
class SuspendedThreadsListMac final : public SuspendedThreadsList {
public:
SuspendedThreadsListMac() : threads_(1024) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

namespace __sanitizer {

class SuspendedThreadsListNetBSD : public SuspendedThreadsList {
class SuspendedThreadsListNetBSD final : public SuspendedThreadsList {
public:
SuspendedThreadsListNetBSD() { thread_ids_.reserve(1024); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class SymbolizerTool {
// Usually this is a safe place to call code that might need to use user
// memory allocators.
virtual void LateInitialize() {}

protected:
~SymbolizerTool() {}
};

// SymbolizerProcess encapsulates communication between the tool and
Expand All @@ -85,6 +88,8 @@ class SymbolizerProcess {
const char *SendCommand(const char *command);

protected:
~SymbolizerProcess() {}

/// The maximum number of arguments required to invoke a tool process.
static const unsigned kArgVMax = 6;

Expand Down Expand Up @@ -128,7 +133,7 @@ class LLVMSymbolizerProcess;

// This tool invokes llvm-symbolizer in a subprocess. It should be as portable
// as the llvm-symbolizer tool is.
class LLVMSymbolizer : public SymbolizerTool {
class LLVMSymbolizer final : public SymbolizerTool {
public:
explicit LLVMSymbolizer(const char *path, LowLevelAllocator *allocator);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace __sanitizer {

class LibbacktraceSymbolizer : public SymbolizerTool {
class LibbacktraceSymbolizer final : public SymbolizerTool {
public:
static LibbacktraceSymbolizer *get(LowLevelAllocator *alloc);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const LoadedModule *Symbolizer::FindModuleForAddress(uptr address) {
// <file_name>:<line_number>:<column_number>
// ...
// <empty line>
class LLVMSymbolizerProcess : public SymbolizerProcess {
class LLVMSymbolizerProcess final : public SymbolizerProcess {
public:
explicit LLVMSymbolizerProcess(const char *path)
: SymbolizerProcess(path, /*use_posix_spawn=*/SANITIZER_MAC) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool DlAddrSymbolizer::SymbolizeData(uptr addr, DataInfo *datainfo) {
// kAsanInternalHeapMagic.
static char kAtosMachPortEnvEntry[] = K_ATOS_ENV_VAR "=000000000000000";

class AtosSymbolizerProcess : public SymbolizerProcess {
class AtosSymbolizerProcess final : public SymbolizerProcess {
public:
explicit AtosSymbolizerProcess(const char *path)
: SymbolizerProcess(path, /*use_posix_spawn*/ true) {
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@

namespace __sanitizer {

class DlAddrSymbolizer : public SymbolizerTool {
class DlAddrSymbolizer final : public SymbolizerTool {
public:
bool SymbolizePC(uptr addr, SymbolizedStack *stack) override;
bool SymbolizeData(uptr addr, DataInfo *info) override;
};

class AtosSymbolizerProcess;

class AtosSymbolizer : public SymbolizerTool {
class AtosSymbolizer final : public SymbolizerTool {
public:
explicit AtosSymbolizer(const char *path, LowLevelAllocator *allocator);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ bool SymbolizerProcess::StartSymbolizerSubprocess() {
return true;
}

class Addr2LineProcess : public SymbolizerProcess {
class Addr2LineProcess final : public SymbolizerProcess {
public:
Addr2LineProcess(const char *path, const char *module_name)
: SymbolizerProcess(path), module_name_(internal_strdup(module_name)) {}
Expand Down Expand Up @@ -261,7 +261,7 @@ bool Addr2LineProcess::ReachedEndOfOutput(const char *buffer,
output_terminator_, kTerminatorLen);
}

class Addr2LinePool : public SymbolizerTool {
class Addr2LinePool final : public SymbolizerTool {
public:
explicit Addr2LinePool(const char *addr2line_path,
LowLevelAllocator *allocator)
Expand Down Expand Up @@ -328,7 +328,7 @@ int __sanitizer_symbolize_demangle(const char *Name, char *Buffer,
int MaxLength);
} // extern "C"

class InternalSymbolizer : public SymbolizerTool {
class InternalSymbolizer final : public SymbolizerTool {
public:
static InternalSymbolizer *get(LowLevelAllocator *alloc) {
if (__sanitizer_symbolize_code != 0 &&
Expand Down Expand Up @@ -387,7 +387,7 @@ class InternalSymbolizer : public SymbolizerTool {
};
#else // SANITIZER_SUPPORTS_WEAK_HOOKS

class InternalSymbolizer : public SymbolizerTool {
class InternalSymbolizer final : public SymbolizerTool {
public:
static InternalSymbolizer *get(LowLevelAllocator *alloc) { return 0; }
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ decltype(::UnDecorateSymbolName) *UnDecorateSymbolName;

namespace {

class WinSymbolizerTool : public SymbolizerTool {
class WinSymbolizerTool final : public SymbolizerTool {
public:
// The constructor is provided to avoid synthesized memsets.
WinSymbolizerTool() {}
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/tsan/dd/dd_rtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct Thread {
bool ignore_interceptors;
};

struct Callback : DDCallback {
struct Callback final : public DDCallback {
Thread *thr;

Callback(Thread *thr);
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace __tsan {

void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r);

struct Callback : DDCallback {
struct Callback final : public DDCallback {
ThreadState *thr;
uptr pc;

Expand Down
Loading

0 comments on commit 9005424

Please sign in to comment.