//===- DiagTool.h - Classes for defining diagtool tools -------------------===// // // 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 implements the boilerplate for defining diagtool tools. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_DIAGTOOL_DIAGTOOL_H #define LLVM_CLANG_TOOLS_DIAGTOOL_DIAGTOOL_H #include "llvm/ADT/StringRef.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/raw_ostream.h" #include <string> namespace diagtool { class DiagTool { … }; class DiagTools { … }; extern llvm::ManagedStatic<DiagTools> diagTools; template <typename DIAGTOOL> class RegisterDiagTool { … }; } // end diagtool namespace #define DEF_DIAGTOOL(NAME, DESC, CLSNAME) … #endif