summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h2
-rw-r--r--llvm/include/llvm/ObjectYAML/DWARFYAML.h25
2 files changed, 27 insertions, 0 deletions
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h
index 837a8e63469..5a602392add 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h
@@ -59,6 +59,8 @@ public:
uint32_t getCompileUnitDIEOffset() const { return HeaderData.CuOffset; }
+ const Header &getHeader() const { return HeaderData; }
+
desc_iterator_range descriptors() const {
return desc_iterator_range(ArangeDescriptors.begin(),
ArangeDescriptors.end());
diff --git a/llvm/include/llvm/ObjectYAML/DWARFYAML.h b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
index e234b628f4c..69e3ab48789 100644
--- a/llvm/include/llvm/ObjectYAML/DWARFYAML.h
+++ b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
@@ -35,9 +35,24 @@ struct Abbrev {
std::vector<AttributeAbbrev> Attributes;
};
+struct ARangeDescriptor {
+ llvm::yaml::Hex64 Address;
+ uint64_t Length;
+};
+
+struct ARange {
+ uint32_t Length;
+ uint16_t Version;
+ uint32_t CuOffset;
+ uint8_t AddrSize;
+ uint8_t SegSize;
+ std::vector<ARangeDescriptor> Descriptors;
+};
+
struct Data {
std::vector<Abbrev> AbbrevDecls;
std::vector<StringRef> DebugStrings;
+ std::vector<ARange> ARanges;
bool isEmpty() const;
};
@@ -48,6 +63,8 @@ struct Data {
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::StringRef)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::AttributeAbbrev)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::Abbrev)
+LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::ARangeDescriptor)
+LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DWARFYAML::ARange)
namespace llvm {
namespace yaml {
@@ -64,6 +81,14 @@ template <> struct MappingTraits<DWARFYAML::AttributeAbbrev> {
static void mapping(IO &IO, DWARFYAML::AttributeAbbrev &AttAbbrev);
};
+template <> struct MappingTraits<DWARFYAML::ARangeDescriptor> {
+ static void mapping(IO &IO, DWARFYAML::ARangeDescriptor &Descriptor);
+};
+
+template <> struct MappingTraits<DWARFYAML::ARange> {
+ static void mapping(IO &IO, DWARFYAML::ARange &Range);
+};
+
#define HANDLE_DW_TAG(unused, name) \
io.enumCase(value, "DW_TAG_" #name, dwarf::DW_TAG_##name);
OpenPOWER on IntegriCloud