xref: /openbsd-src/gnu/llvm/compiler-rt/lib/gwp_asan/tests/harness.cpp (revision 5a38ef86d0b61900239c7913d24a05e7b88a58f0)
1 //===-- harness.cpp ---------------------------------------------*- 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 #include "gwp_asan/tests/harness.h"
10 
11 namespace gwp_asan {
12 namespace test {
13 bool OnlyOnce() {
14   static int x = 0;
15   return !x++;
16 }
17 } // namespace test
18 } // namespace gwp_asan
19