#include "llvm/DebugInfo/Symbolize/SymbolizableModule.h"
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Transforms/Utils/SanitizerStats.h"
#include <stdint.h>
usingnamespacellvm;
static cl::OptionCategory Cat("sanstats Options");
static cl::opt<std::string> ClInputFile(cl::Positional, cl::Required,
cl::desc("<filename>"));
static cl::opt<bool> ClDemangle("demangle", cl::init(false),
cl::desc("Print demangled function name"),
cl::cat(Cat));
inline uint64_t KindFromData(uint64_t Data, char SizeofPtr) { … }
inline uint64_t CountFromData(uint64_t Data, char SizeofPtr) { … }
static uint64_t ReadLE(char Size, const char *Begin, const char *End) { … }
static const char *ReadModule(char SizeofPtr, const char *Begin,
const char *End) { … }
int main(int argc, char **argv) { … }