diff options
| author | Zachary Turner <zturner@google.com> | 2016-05-25 00:12:48 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2016-05-25 00:12:48 +0000 |
| commit | 172d59c105ea99da09bbbef25698e94b8358bf20 (patch) | |
| tree | 34c6a512f85a909559eac6d363485fca93a6549a /llvm/lib/DebugInfo/CodeView | |
| parent | 9f054d424fc5ccb73d0c668a3942281a957242c0 (diff) | |
| download | bcm5719-llvm-172d59c105ea99da09bbbef25698e94b8358bf20.tar.gz bcm5719-llvm-172d59c105ea99da09bbbef25698e94b8358bf20.zip | |
[codeview] Add support for new types and symbols.
This patch adds support for:
S_EXPORT
LF_BITFIELD
With this patch, I have run through a couple of gigabytes of PDB
files and cannot find a type or symbol that we do not understand.
llvm-svn: 270637
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView')
| -rw-r--r-- | llvm/lib/DebugInfo/CodeView/TypeDumper.cpp | 15 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/CodeView/TypeRecord.cpp | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp b/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp index 72e0e44ce26..74cb2d9e9c4 100644 --- a/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp +++ b/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp @@ -209,6 +209,7 @@ public: #include "llvm/DebugInfo/CodeView/TypeRecords.def" void visitUnknownMember(TypeLeafKind Leaf); + void visitUnknownType(TypeLeafKind Leaf, ArrayRef<uint8_t> LeafData); void visitTypeBegin(TypeLeafKind Leaf, ArrayRef<uint8_t> LeafData); void visitTypeEnd(TypeLeafKind Leaf, ArrayRef<uint8_t> LeafData); @@ -493,6 +494,13 @@ void CVTypeDumperImpl::visitModifier(TypeLeafKind Leaf, ModifierRecord &Mod) { Name = CVTD.saveName(TypeName); } +void CVTypeDumperImpl::visitBitField(TypeLeafKind Leaf, + BitFieldRecord &BitField) { + printTypeIndex("Type", BitField.getType()); + W.printNumber("BitSize", BitField.getBitSize()); + W.printNumber("BitOffset", BitField.getBitOffset()); +} + void CVTypeDumperImpl::visitVFTableShape(TypeLeafKind Leaf, VFTableShapeRecord &Shape) { W.printNumber("VFEntryCount", Shape.getEntryCount()); @@ -538,6 +546,13 @@ void CVTypeDumperImpl::visitUnknownMember(TypeLeafKind Leaf) { W.printHex("UnknownMember", unsigned(Leaf)); } +void CVTypeDumperImpl::visitUnknownType(TypeLeafKind Leaf, + ArrayRef<uint8_t> RecordData) { + DictScope S(W, "UnknownType"); + W.printEnum("Kind", uint16_t(Leaf), makeArrayRef(LeafTypeNames)); + W.printNumber("Length", uint32_t(RecordData.size())); +} + void CVTypeDumperImpl::visitNestedType(TypeLeafKind Leaf, NestedTypeRecord &Nested) { DictScope S(W, "NestedType"); diff --git a/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp b/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp index 57cd5b7e264..e9782978535 100644 --- a/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp +++ b/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp @@ -105,6 +105,10 @@ bool EnumRecord::remapTypeIndices(ArrayRef<TypeIndex> IndexMap) { return Success; } +bool BitFieldRecord::remapTypeIndices(ArrayRef<TypeIndex> IndexMap) { + return remapIndex(IndexMap, Type); +} + bool VFTableShapeRecord::remapTypeIndices(ArrayRef<TypeIndex> IndexMap) { return true; } |

