Path: blob/main/contrib/llvm-project/compiler-rt/lib/gwp_asan/utilities.h
35236 views
//===-- utilities.h ---------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef GWP_ASAN_UTILITIES_H_9#define GWP_ASAN_UTILITIES_H_1011#include "gwp_asan/definitions.h"1213#include <stddef.h>1415namespace gwp_asan {16// Terminates in a platform-specific way with `Message`.17void die(const char *Message);1819// Checks that `Condition` is true, otherwise dies with `Message`.20GWP_ASAN_ALWAYS_INLINE void check(bool Condition, const char *Message) {21if (Condition)22return;23die(Message);24}25} // namespace gwp_asan2627#endif // GWP_ASAN_UTILITIES_H_282930