9#ifndef CLANG_INCLUDE_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ENTRYPOINTSTATS_H
10#define CLANG_INCLUDE_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_ENTRYPOINTSTATS_H
12#include "llvm/ADT/Statistic.h"
13#include "llvm/ADT/StringRef.h"
26 llvm::StringLiteral
name()
const {
return Name; }
42 llvm::StringLiteral Name;
46 std::optional<bool>
Value = {};
52 assert(!
Value.has_value());
97 std::optional<unsigned>
Value = {};
104 assert(!
Value.has_value());
111 llvm::TrackingStatistic S;
115 llvm::StringLiteral Name,
116 llvm::StringLiteral Desc)
117 : M(Name), S(DebugType, Name.data(), Desc.data()) {}
138 llvm::TrackingStatistic S;
142 llvm::StringLiteral Name,
143 llvm::StringLiteral Desc)
144 : M(Name), S(DebugType, Name.data(), Desc.data()) {}
151#define STAT_COUNTER(VARNAME, DESC) \
152 static clang::ento::CounterEntryPointTranslationUnitStat VARNAME = { \
153 DEBUG_TYPE, #VARNAME, DESC}
155#define STAT_MAX(VARNAME, DESC) \
156 static clang::ento::UnsignedMaxEntryPointTranslationUnitStatistic VARNAME = \
157 {DEBUG_TYPE, #VARNAME, DESC}
Decl - This represents one declaration (or definition), e.g.
CounterEPStat & operator++()
CounterEPStat & operator++(int)
CounterEPStat & operator+=(unsigned Inc)
CounterEntryPointTranslationUnitStat & operator++(int)
CounterEntryPointTranslationUnitStat & operator+=(unsigned Inc)
CounterEntryPointTranslationUnitStat & operator++()
CounterEntryPointTranslationUnitStat(const char *DebugType, llvm::StringLiteral Name, llvm::StringLiteral Desc)
static void dumpStatsAsCSV(llvm::raw_ostream &OS)
EntryPointStat & operator=(EntryPointStat &)=delete
static void lockRegistry()
EntryPointStat & operator=(EntryPointStat &&)=delete
static void takeSnapshot(const Decl *EntryPoint)
llvm::StringLiteral name() const
EntryPointStat(llvm::StringLiteral Name)
EntryPointStat(const EntryPointStat &)=delete
EntryPointStat(EntryPointStat &&)=delete
void updateMax(unsigned X)
void updateMax(uint64_t Value)
UnsignedMaxEntryPointTranslationUnitStatistic(const char *DebugType, llvm::StringLiteral Name, llvm::StringLiteral Desc)
@ OS
Indicates that the tracking object is a descendant of a referenced-counted OSObject,...
std::variant< struct RequiresDecl, struct HeaderDecl, struct UmbrellaDirDecl, struct ModuleDecl, struct ExcludeDecl, struct ExportDecl, struct ExportAsDecl, struct ExternModuleDecl, struct UseDecl, struct LinkDecl, struct ConfigMacrosDecl, struct ConflictDecl > Decl
All declarations that can appear in a module declaration.
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.