xref: /freebsd/contrib/llvm-project/compiler-rt/lib/lsan/lsan_fuchsia.h (revision a90b9d0159070121c221b966469c3e36d912bf82)
1 //=-- lsan_fuchsia.h ---------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===---------------------------------------------------------------------===//
8 //
9 // This file is a part of LeakSanitizer.
10 // Standalone LSan RTL code specific to Fuchsia.
11 //
12 //===---------------------------------------------------------------------===//
13 
14 #ifndef LSAN_FUCHSIA_H
15 #define LSAN_FUCHSIA_H
16 
17 #include "lsan_thread.h"
18 #include "sanitizer_common/sanitizer_platform.h"
19 
20 #if !SANITIZER_FUCHSIA
21 #error "lsan_fuchsia.h is used only on Fuchsia systems (SANITIZER_FUCHSIA)"
22 #endif
23 
24 namespace __lsan {
25 
26 class ThreadContext final : public ThreadContextLsanBase {
27  public:
28   explicit ThreadContext(int tid);
29   void OnCreated(void *arg) override;
30   void OnStarted(void *arg) override;
31 };
32 
33 }  // namespace __lsan
34 
35 #endif  // LSAN_FUCHSIA_H
36