[compiler-rt] r355377 - [NFC] Move ScopedUnwinding from .h to .cc
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 20:36:57 PST 2019
Author: vitalybuka
Date: Mon Mar 4 20:36:56 2019
New Revision: 355377
URL: http://llvm.org/viewvc/llvm-project?rev=355377&view=rev
Log:
[NFC] Move ScopedUnwinding from .h to .cc
Modified:
compiler-rt/trunk/lib/asan/asan_stack.cc
compiler-rt/trunk/lib/asan/asan_thread.h
Modified: compiler-rt/trunk/lib/asan/asan_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_stack.cc?rev=355377&r1=355376&r2=355377&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_stack.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_stack.cc Mon Mar 4 20:36:56 2019
@@ -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(
Modified: compiler-rt/trunk/lib/asan/asan_thread.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_thread.h?rev=355377&r1=355376&r2=355377&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_thread.h (original)
+++ compiler-rt/trunk/lib/asan/asan_thread.h Mon Mar 4 20:36:56 2019
@@ -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();
More information about the llvm-commits
mailing list