32 lines · c
1//===-- options_parser.h ----------------------------------------*- 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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef GWP_ASAN_OPTIONAL_OPTIONS_PARSER_H_10#define GWP_ASAN_OPTIONAL_OPTIONS_PARSER_H_11 12#include "gwp_asan/optional/printf.h"13#include "gwp_asan/options.h"14 15namespace gwp_asan {16namespace options {17// Parse the options from the GWP_ASAN_OPTIONS environment variable.18void initOptions(Printf_t PrintfForWarnings = nullptr);19// Parse the options from the provided string.20void initOptions(const char *OptionsStr, Printf_t PrintfForWarnings = nullptr);21// Returns the initialised options. Call initOptions() prior to calling this22// function.23Options &getOptions();24} // namespace options25} // namespace gwp_asan26 27extern "C" {28__attribute__((weak)) const char *__gwp_asan_default_options();29}30 31#endif // GWP_ASAN_OPTIONAL_OPTIONS_PARSER_H_32