From 99c6982bcd8f2990db560e580f7909827f62deef Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Thu, 31 Aug 2017 20:43:22 +0000 Subject: [llvm-pdbutil] Print detailed S_UDT stats. This adds a new command line option, -udt-stats, which breaks down the stats of S_UDT records. These are one of the biggest contributors to the size of /DEBUG:FASTLINK PDBs, so they need some additional tools to be able to analyze their usage. This option will dig into each S_UDT record and determine what kind of record it points to, and then break down the statistics by the target type. The goal here is to identify how our object files differ from MSVC object files in S_UDT records, so that we can output fewer of them and reach size parity. llvm-svn: 312276 --- llvm/tools/llvm-pdbutil/FormatUtil.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'llvm/tools/llvm-pdbutil/FormatUtil.cpp') diff --git a/llvm/tools/llvm-pdbutil/FormatUtil.cpp b/llvm/tools/llvm-pdbutil/FormatUtil.cpp index eca0751a7ac..f55d478127d 100644 --- a/llvm/tools/llvm-pdbutil/FormatUtil.cpp +++ b/llvm/tools/llvm-pdbutil/FormatUtil.cpp @@ -157,6 +157,18 @@ std::string llvm::pdb::formatSymbolKind(SymbolKind K) { return formatUnknownEnum(K); } +StringRef llvm::pdb::formatTypeLeafKind(TypeLeafKind K) { + switch (K) { +#define TYPE_RECORD(EnumName, value, name) \ + case EnumName: \ + return #EnumName; +#include "llvm/DebugInfo/CodeView/CodeViewTypes.def" + default: + llvm_unreachable("Unknown type leaf kind!"); + } + return ""; +} + std::string llvm::pdb::formatSegmentOffset(uint16_t Segment, uint32_t Offset) { return formatv("{0:4}:{1:4}", Segment, Offset); } -- cgit v1.2.3