[AA] Take account of C++23's stricter rules for forward declarations (NFC) (#109416)
[llvm-project.git] / compiler-rt / lib / rtsan / rtsan_preinit.cpp
blob1307268951fbcd9b6231a3df29832023bfe1ecb0
1 //===--- rtsan_preinit.cpp - Realtime Sanitizer -----------------*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
11 #include "sanitizer_common/sanitizer_internal_defs.h"
12 #include <rtsan/rtsan.h>
14 #if SANITIZER_CAN_USE_PREINIT_ARRAY
16 // This section is linked into the main executable when -fsanitize=realtime is
17 // specified to perform initialization at a very early stage.
18 __attribute__((section(".preinit_array"), used)) static auto preinit =
19 __rtsan_init;
21 #endif