[NFC] Move ScopedUnwinding from .h to .cc

llvm-svn: 355377
This commit is contained in:
Vitaly Buka 2019-03-05 04:36:56 +00:00
parent 4d9d2251ab
commit 7cbb408850
2 changed files with 14 additions and 12 deletions

View File

@ -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(

View File

@ -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();