using namespace llvm::codeview;
using namespace llvm::pdb;
-static StringRef getSymbolKindName(SymbolKind K) {
+static std::string getSymbolKindName(SymbolKind K) {
switch (K) {
#define SYMBOL_RECORD(EnumName, value, name) \
case EnumName: \
return #EnumName;
#define CV_SYMBOL(EnumName, value) SYMBOL_RECORD(EnumName, value, EnumName)
#include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
- default:
- llvm_unreachable("Unknown symbol kind!");
+ default: {
+ return formatv("Unknown Symbol Kind [{0:X}]", uint32_t(K)).str();
+ }
}
return "";
}
Error MinimalSymbolDumper::visitKnownRecord(CVSymbol &CVR,
HeapAllocationSiteSym &HAS) {
AutoIndent Indent(P, 7);
- P.formatLine("type = {0}, addr = {1} call size = {2}", typeIndex(HAS.Type),
+ P.formatLine("type = {0}, addr = {1} call size = {2}", idIndex(HAS.Type),
formatSegmentOffset(HAS.Segment, HAS.CodeOffset),
HAS.CallInstructionSize);
return Error::success();
StringRef Annotations(reinterpret_cast<const char *>(Bytes.begin()),
Bytes.size());
- P.formatLine("inlinee = {0}, parent = {1}, end = {2}", typeIndex(IS.Inlinee),
+ P.formatLine("inlinee = {0}, parent = {1}, end = {2}", idIndex(IS.Inlinee),
IS.Parent, IS.End);
P.formatLine("annotations = {0}", toHex(Annotations));
return Error::success();
Error MinimalSymbolDumper::visitKnownRecord(CVSymbol &CVR, CallerSym &Caller) {
AutoIndent Indent(P, 7);
for (const auto &I : Caller.Indices) {
- P.formatLine("callee: {0}", typeIndex(I));
+ P.formatLine("callee: {0}", idIndex(I));
}
return Error::success();
}