forked from OSchip/llvm-project
tsan: fix clang -Wall build
Clang does not like classes with virtual functions but w/o virtual dtor. Go does not like libstdc++ (operator delete). llvm-svn: 177267
This commit is contained in:
parent
b5d10f69e4
commit
49e462fab2
|
@ -22,7 +22,11 @@ ThreadContextBase::ThreadContextBase(u32 tid)
|
|||
name[0] = '\0';
|
||||
}
|
||||
|
||||
ThreadContextBase::~ThreadContextBase() {}
|
||||
#ifndef SANITIZER_GO
|
||||
ThreadContextBase::~ThreadContextBase() {
|
||||
CHECK(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
void ThreadContextBase::SetName(const char *new_name) {
|
||||
name[0] = '\0';
|
||||
|
|
|
@ -34,6 +34,9 @@ enum ThreadStatus {
|
|||
class ThreadContextBase {
|
||||
public:
|
||||
explicit ThreadContextBase(u32 tid);
|
||||
#ifndef SANITIZER_GO // Go does not have libstdc++
|
||||
virtual
|
||||
#endif
|
||||
~ThreadContextBase();
|
||||
|
||||
const u32 tid; // Thread ID. Main thread should have tid = 0.
|
||||
|
|
|
@ -419,6 +419,7 @@ struct ThreadDeadInfo {
|
|||
class ThreadContext : public ThreadContextBase {
|
||||
public:
|
||||
explicit ThreadContext(int tid);
|
||||
~ThreadContext();
|
||||
ThreadState *thr;
|
||||
#ifdef TSAN_GO
|
||||
StackTrace creation_stack;
|
||||
|
|
|
@ -31,6 +31,11 @@ ThreadContext::ThreadContext(int tid)
|
|||
, dead_info() {
|
||||
}
|
||||
|
||||
#ifndef TSAN_GO
|
||||
ThreadContext::~ThreadContext() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void ThreadContext::OnDead() {
|
||||
sync.Reset();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue