16#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_TOOL_UTILS_H
17#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_TOOL_UTILS_H
20#include "llvm/ADT/ArrayRef.h"
21#include "llvm/ADT/StringRef.h"
22#include "llvm/Support/CommandLine.h"
23#include "llvm/Support/Error.h"
24#include "llvm/Support/FormatVariadic.h"
43 "failed to validate summary '{0}': {1}";
48 "Format not registered for extension '{0}'";
51 "Parent directory does not exist";
63template <
typename... Ts>
65 std::string Message = llvm::formatv(Fmt, std::forward<Ts>(Args)...);
83void initTool(
int argc,
const char **argv, llvm::StringRef Version,
84 llvm::cl::OptionCategory &Category, llvm::StringRef ToolHeading);
constexpr const char * ExtensionNotSupplied
constexpr const char * CannotValidateSummary
constexpr const char * NoFormatForExtension
constexpr const char * OutputDirectoryMissing
constexpr const char * FailedToLoadPlugin
llvm::StringRef getToolName()
Returns the name of the running tool, as set by initTool().
void fail(const char *Msg)
void initTool(int argc, const char **argv, llvm::StringRef Version, llvm::cl::OptionCategory &Category, llvm::StringRef ToolHeading)
Sets ToolName, ToolVersion, and the version printer, hides unrelated command-line options,...
void loadPlugins(llvm::ArrayRef< std::string > Paths)
SerializationFormat * Format
static SummaryFile fromPath(llvm::StringRef Path)
Constructs a SummaryFile by resolving the serialization format from the file extension.