forked from OSchip/llvm-project
[NFC] Move ScopedUnwinding from .h to .cc
llvm-svn: 355377
This commit is contained in:
parent
4d9d2251ab
commit
7cbb408850
|
@ -26,6 +26,20 @@ u32 GetMallocContextSize() {
|
|||
return atomic_load(&malloc_context_size, memory_order_acquire);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
// ScopedUnwinding is a scope for stacktracing member of a context
|
||||
class ScopedUnwinding {
|
||||
public:
|
||||
explicit ScopedUnwinding(AsanThread *t) : thread(t) { t->setUnwinding(true); }
|
||||
~ScopedUnwinding() { thread->setUnwinding(false); }
|
||||
|
||||
private:
|
||||
AsanThread *thread;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
} // namespace __asan
|
||||
|
||||
void __sanitizer::BufferedStackTrace::UnwindImpl(
|
||||
|
|
|
@ -170,18 +170,6 @@ class AsanThread {
|
|||
uptr extra_spill_area_;
|
||||
};
|
||||
|
||||
// ScopedUnwinding is a scope for stacktracing member of a context
|
||||
class ScopedUnwinding {
|
||||
public:
|
||||
explicit ScopedUnwinding(AsanThread *t) : thread(t) {
|
||||
t->setUnwinding(true);
|
||||
}
|
||||
~ScopedUnwinding() { thread->setUnwinding(false); }
|
||||
|
||||
private:
|
||||
AsanThread *thread;
|
||||
};
|
||||
|
||||
// Returns a single instance of registry.
|
||||
ThreadRegistry &asanThreadRegistry();
|
||||
|
||||
|
|
Loading…
Reference in New Issue