diff options
Diffstat (limited to 'llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp b/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp index e4f5f533262b..1d0178532882 100644 --- a/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp +++ b/llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp @@ -465,13 +465,10 @@ LVScope *LVNamespaceDeduction::get(LVStringRefs Components) { LVScope *LVNamespaceDeduction::get(StringRef ScopedName, bool CheckScope) { LVStringRefs Components = getAllLexicalComponents(ScopedName); if (CheckScope) - Components.erase(std::remove_if(Components.begin(), Components.end(), - [&](StringRef Component) { - LookupSet::iterator Iter = - IdentifiedNamespaces.find(Component); - return Iter == IdentifiedNamespaces.end(); - }), - Components.end()); + llvm::erase_if(Components, [&](StringRef Component) { + LookupSet::iterator Iter = IdentifiedNamespaces.find(Component); + return Iter == IdentifiedNamespaces.end(); + }); LLVM_DEBUG( { dbgs() << formatv("ScopedName: '{0}'\n", ScopedName.str().c_str()); }); @@ -1688,6 +1685,48 @@ Error LVSymbolVisitor::visitKnownRecord(CVSymbol &Record, return Error::success(); } +// S_ARMSWITCHTABLE +Error LVSymbolVisitor::visitKnownRecord(CVSymbol &CVR, + JumpTableSym &JumpTable) { + LLVM_DEBUG({ + W.printHex("BaseOffset", JumpTable.BaseOffset); + W.printNumber("BaseSegment", JumpTable.BaseSegment); + W.printFlags("SwitchType", static_cast<uint16_t>(JumpTable.SwitchType), + getJumpTableEntrySizeNames()); + W.printHex("BranchOffset", JumpTable.BranchOffset); + W.printHex("TableOffset", JumpTable.TableOffset); + W.printNumber("BranchSegment", JumpTable.BranchSegment); + W.printNumber("TableSegment", JumpTable.TableSegment); + W.printNumber("EntriesCount", JumpTable.EntriesCount); + }); + return Error::success(); +} + +// S_CALLERS, S_CALLEES, S_INLINEES +Error LVSymbolVisitor::visitKnownRecord(CVSymbol &Record, CallerSym &Caller) { + LLVM_DEBUG({ + llvm::StringRef FieldName; + switch (Caller.getKind()) { + case SymbolRecordKind::CallerSym: + FieldName = "Callee"; + break; + case SymbolRecordKind::CalleeSym: + FieldName = "Caller"; + break; + case SymbolRecordKind::InlineesSym: + FieldName = "Inlinee"; + break; + default: + return llvm::make_error<CodeViewError>( + "Unknown CV Record type for a CallerSym object!"); + } + for (auto FuncID : Caller.Indices) { + printTypeIndex(FieldName, FuncID); + } + }); + return Error::success(); +} + #undef DEBUG_TYPE #define DEBUG_TYPE "CodeViewLogicalVisitor" @@ -2897,7 +2936,7 @@ Error LVLogicalVisitor::finishVisitation(CVType &Record, TypeIndex TI, // Customized version of 'FieldListVisitHelper'. Error LVLogicalVisitor::visitFieldListMemberStream( TypeIndex TI, LVElement *Element, ArrayRef<uint8_t> FieldList) { - BinaryByteStream Stream(FieldList, llvm::support::little); + BinaryByteStream Stream(FieldList, llvm::endianness::little); BinaryStreamReader Reader(Stream); FieldListDeserializer Deserializer(Reader); TypeVisitorCallbackPipeline Pipeline; |
