LLVM  6.0.0svn
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::DWARFVerifier::DieRangeInfo Struct Reference

A class that keeps the address range information for a single DIE. More...

#include "llvm/DebugInfo/DWARF/DWARFVerifier.h"

Collaboration diagram for llvm::DWARFVerifier::DieRangeInfo:
Collaboration graph
[legend]

Public Types

typedef std::vector< DWARFAddressRange >::const_iterator address_range_iterator
 
typedef std::set< DieRangeInfo >::const_iterator die_range_info_iterator
 

Public Member Functions

 DieRangeInfo ()=default
 
 DieRangeInfo (DWARFDie Die)
 
 DieRangeInfo (std::vector< DWARFAddressRange > Ranges)
 Used for unit testing. More...
 
address_range_iterator insert (const DWARFAddressRange &R)
 Inserts the address range. More...
 
address_range_iterator findRange (const DWARFAddressRange &R) const
 Finds an address range in the sorted vector of ranges. More...
 
die_range_info_iterator insert (const DieRangeInfo &RI)
 Inserts the address range info. More...
 
bool contains (const DieRangeInfo &RHS) const
 Return true if ranges in this object contains all ranges within RHS. More...
 
bool intersects (const DieRangeInfo &RHS) const
 Return true if any range in this object intersects with any range in RHS. More...
 

Public Attributes

DWARFDie Die
 
std::vector< DWARFAddressRangeRanges
 Sorted DWARFAddressRanges. More...
 
std::set< DieRangeInfoChildren
 Sorted DWARFAddressRangeInfo. More...
 

Detailed Description

A class that keeps the address range information for a single DIE.

Definition at line 37 of file DWARFVerifier.h.

Member Typedef Documentation

◆ address_range_iterator

Definition at line 54 of file DWARFVerifier.h.

◆ die_range_info_iterator

Definition at line 55 of file DWARFVerifier.h.

Constructor & Destructor Documentation

◆ DieRangeInfo() [1/3]

llvm::DWARFVerifier::DieRangeInfo::DieRangeInfo ( )
default

◆ DieRangeInfo() [2/3]

llvm::DWARFVerifier::DieRangeInfo::DieRangeInfo ( DWARFDie  Die)
inline

Definition at line 47 of file DWARFVerifier.h.

◆ DieRangeInfo() [3/3]

llvm::DWARFVerifier::DieRangeInfo::DieRangeInfo ( std::vector< DWARFAddressRange Ranges)
inline

Used for unit testing.

Definition at line 50 of file DWARFVerifier.h.

Member Function Documentation

◆ contains()

bool DWARFVerifier::DieRangeInfo::contains ( const DieRangeInfo RHS) const

Return true if ranges in this object contains all ranges within RHS.

Definition at line 64 of file DWARFVerifier.cpp.

References llvm::WebAssembly::End, and Ranges.

Referenced by findRange(), and llvm::DWARFVerifier::handleDebugInfo().

◆ findRange()

address_range_iterator llvm::DWARFVerifier::DieRangeInfo::findRange ( const DWARFAddressRange R) const
inline

Finds an address range in the sorted vector of ranges.

Definition at line 65 of file DWARFVerifier.h.

References contains(), Die, llvm::WebAssembly::End, error, insert(), and intersects().

◆ insert() [1/2]

DWARFVerifier::DieRangeInfo::address_range_iterator DWARFVerifier::DieRangeInfo::insert ( const DWARFAddressRange R)

Inserts the address range.

If the range overlaps with an existing range, the range is not added and an iterator to the overlapping range is returned.

This is used for finding overlapping ranges within the same DIE.

Definition at line 32 of file DWARFVerifier.cpp.

References llvm::WebAssembly::End, and llvm::lower_bound().

Referenced by findRange(), and llvm::DWARFVerifier::handleDebugInfo().

◆ insert() [2/2]

DWARFVerifier::DieRangeInfo::die_range_info_iterator DWARFVerifier::DieRangeInfo::insert ( const DieRangeInfo RI)

Inserts the address range info.

If any of its ranges overlaps with a range in an existing range info, the range info is not added and an iterator to the overlapping range info.

This is used for finding overlapping children of the same DIE.

Definition at line 52 of file DWARFVerifier.cpp.

References llvm::WebAssembly::End.

◆ intersects()

bool DWARFVerifier::DieRangeInfo::intersects ( const DieRangeInfo RHS) const

Member Data Documentation

◆ Children

std::set<DieRangeInfo> llvm::DWARFVerifier::DieRangeInfo::Children

Sorted DWARFAddressRangeInfo.

Definition at line 44 of file DWARFVerifier.h.

Referenced by llvm::DWARFVerifier::handleDebugInfo().

◆ Die

DWARFDie llvm::DWARFVerifier::DieRangeInfo::Die

◆ Ranges

std::vector<DWARFAddressRange> llvm::DWARFVerifier::DieRangeInfo::Ranges

Sorted DWARFAddressRanges.

Definition at line 41 of file DWARFVerifier.h.

Referenced by contains(), llvm::DWARFVerifier::handleDebugInfo(), intersects(), and llvm::operator<().


The documentation for this struct was generated from the following files: