diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /lib/ObjectYAML/CodeViewYAMLSymbols.cpp | |
parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) |
Notes
Diffstat (limited to 'lib/ObjectYAML/CodeViewYAMLSymbols.cpp')
-rw-r--r-- | lib/ObjectYAML/CodeViewYAMLSymbols.cpp | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/lib/ObjectYAML/CodeViewYAMLSymbols.cpp b/lib/ObjectYAML/CodeViewYAMLSymbols.cpp index 199a65a2870e..f67a0db690eb 100644 --- a/lib/ObjectYAML/CodeViewYAMLSymbols.cpp +++ b/lib/ObjectYAML/CodeViewYAMLSymbols.cpp @@ -40,6 +40,7 @@ using namespace llvm::CodeViewYAML::detail; using namespace llvm::yaml; LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(TypeIndex) +LLVM_YAML_IS_SEQUENCE_VECTOR(LocalVariableAddrGap) // We only need to declare these, the definitions are in CodeViewYAMLTypes.cpp LLVM_YAML_DECLARE_SCALAR_TRAITS(APSInt, QuotingType::None) @@ -181,6 +182,24 @@ void ScalarEnumerationTraits<FrameCookieKind>::enumeration( } namespace llvm { +namespace yaml { +template <> struct MappingTraits<LocalVariableAddrRange> { + static void mapping(IO &io, LocalVariableAddrRange &Range) { + io.mapRequired("OffsetStart", Range.OffsetStart); + io.mapRequired("ISectStart", Range.ISectStart); + io.mapRequired("Range", Range.Range); + } +}; +template <> struct MappingTraits<LocalVariableAddrGap> { + static void mapping(IO &io, LocalVariableAddrGap &Gap) { + io.mapRequired("GapStartOffset", Gap.GapStartOffset); + io.mapRequired("Range", Gap.Range); + } +}; +} // namespace yaml +} // namespace llvm + +namespace llvm { namespace CodeViewYAML { namespace detail { @@ -353,32 +372,50 @@ template <> void SymbolRecordImpl<LocalSym>::map(IO &IO) { } template <> void SymbolRecordImpl<DefRangeSym>::map(IO &IO) { - // TODO: Print the subfields + IO.mapRequired("Program", Symbol.Program); + IO.mapRequired("Range", Symbol.Range); + IO.mapRequired("Gaps", Symbol.Gaps); } template <> void SymbolRecordImpl<DefRangeSubfieldSym>::map(IO &IO) { - // TODO: Print the subfields + IO.mapRequired("Program", Symbol.Program); + IO.mapRequired("OffsetInParent", Symbol.OffsetInParent); + IO.mapRequired("Range", Symbol.Range); + IO.mapRequired("Gaps", Symbol.Gaps); } template <> void SymbolRecordImpl<DefRangeRegisterSym>::map(IO &IO) { - // TODO: Print the subfields + IO.mapRequired("Register", Symbol.Hdr.Register); + IO.mapRequired("MayHaveNoName", Symbol.Hdr.MayHaveNoName); + IO.mapRequired("Range", Symbol.Range); + IO.mapRequired("Gaps", Symbol.Gaps); } template <> void SymbolRecordImpl<DefRangeFramePointerRelSym>::map(IO &IO) { - // TODO: Print the subfields + IO.mapRequired("Offset", Symbol.Offset); + IO.mapRequired("Range", Symbol.Range); + IO.mapRequired("Gaps", Symbol.Gaps); } template <> void SymbolRecordImpl<DefRangeSubfieldRegisterSym>::map(IO &IO) { - // TODO: Print the subfields + IO.mapRequired("Register", Symbol.Hdr.Register); + IO.mapRequired("MayHaveNoName", Symbol.Hdr.MayHaveNoName); + IO.mapRequired("OffsetInParent", Symbol.Hdr.OffsetInParent); + IO.mapRequired("Range", Symbol.Range); + IO.mapRequired("Gaps", Symbol.Gaps); } template <> void SymbolRecordImpl<DefRangeFramePointerRelFullScopeSym>::map(IO &IO) { - // TODO: Print the subfields + IO.mapRequired("Register", Symbol.Offset); } template <> void SymbolRecordImpl<DefRangeRegisterRelSym>::map(IO &IO) { - // TODO: Print the subfields + IO.mapRequired("Register", Symbol.Hdr.Register); + IO.mapRequired("Flags", Symbol.Hdr.Flags); + IO.mapRequired("BasePointerOffset", Symbol.Hdr.BasePointerOffset); + IO.mapRequired("Range", Symbol.Range); + IO.mapRequired("Gaps", Symbol.Gaps); } template <> void SymbolRecordImpl<BlockSym>::map(IO &IO) { |