llvm/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h

//===-- sanitizer_flag_parser.h ---------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is a part of ThreadSanitizer/AddressSanitizer runtime.
//
//===----------------------------------------------------------------------===//

#ifndef SANITIZER_FLAG_REGISTRY_H
#define SANITIZER_FLAG_REGISTRY_H

#include "sanitizer_common.h"
#include "sanitizer_internal_defs.h"
#include "sanitizer_libc.h"

namespace __sanitizer {

class FlagHandlerBase {};

template <typename T>
class FlagHandler final : public FlagHandlerBase {};

inline bool ParseBool(const char *value, bool *b) {}

template <>
inline bool FlagHandler<bool>::Parse(const char *value) {}

template <>
inline bool FlagHandler<bool>::Format(char *buffer, uptr size) {}

template <>
inline bool FlagHandler<HandleSignalMode>::Parse(const char *value) {}

template <>
inline bool FlagHandler<HandleSignalMode>::Format(char *buffer, uptr size) {}

template <>
inline bool FlagHandler<const char *>::Parse(const char *value) {}

template <>
inline bool FlagHandler<const char *>::Format(char *buffer, uptr size) {}

template <>
inline bool FlagHandler<int>::Parse(const char *value) {}

template <>
inline bool FlagHandler<int>::Format(char *buffer, uptr size) {}

template <>
inline bool FlagHandler<uptr>::Parse(const char *value) {}

template <>
inline bool FlagHandler<uptr>::Format(char *buffer, uptr size) {}

template <>
inline bool FlagHandler<s64>::Parse(const char *value) {}

template <>
inline bool FlagHandler<s64>::Format(char *buffer, uptr size) {}

class FlagParser {};

template <typename T>
static void RegisterFlag(FlagParser *parser, const char *name, const char *desc,
                         T *var) {}

void ReportUnrecognizedFlags();

}  // namespace __sanitizer

#endif  // SANITIZER_FLAG_REGISTRY_H