10b57cec5SDimitry Andric //===-- flags.h -------------------------------------------------*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #ifndef SCUDO_FLAGS_H_ 100b57cec5SDimitry Andric #define SCUDO_FLAGS_H_ 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric #include "internal_defs.h" 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric namespace scudo { 150b57cec5SDimitry Andric 160b57cec5SDimitry Andric struct Flags { 170b57cec5SDimitry Andric #define SCUDO_FLAG(Type, Name, DefaultValue, Description) Type Name; 180b57cec5SDimitry Andric #include "flags.inc" 190b57cec5SDimitry Andric #undef SCUDO_FLAG 20*480093f4SDimitry Andric 21*480093f4SDimitry Andric #ifdef GWP_ASAN_HOOKS 22*480093f4SDimitry Andric #define GWP_ASAN_OPTION(Type, Name, DefaultValue, Description) \ 23*480093f4SDimitry Andric Type GWP_ASAN_##Name; 24*480093f4SDimitry Andric #include "gwp_asan/options.inc" 25*480093f4SDimitry Andric #undef GWP_ASAN_OPTION 26*480093f4SDimitry Andric #endif // GWP_ASAN_HOOKS 27*480093f4SDimitry Andric 280b57cec5SDimitry Andric void setDefaults(); 290b57cec5SDimitry Andric }; 300b57cec5SDimitry Andric 310b57cec5SDimitry Andric Flags *getFlags(); 320b57cec5SDimitry Andric void initFlags(); 330b57cec5SDimitry Andric class FlagParser; 340b57cec5SDimitry Andric void registerFlags(FlagParser *Parser, Flags *F); 350b57cec5SDimitry Andric 360b57cec5SDimitry Andric } // namespace scudo 370b57cec5SDimitry Andric 380b57cec5SDimitry Andric #endif // SCUDO_FLAGS_H_ 39