@@ -615,21 +615,21 @@ class SectionRange {
615
615
public:
616
616
SectionRange () = default ;
617
617
SectionRange (const Section &Sec) {
618
- if (llvm::empty (Sec.symbols ()))
618
+ if (llvm::empty (Sec.blocks ()))
619
619
return ;
620
- First = Last = *Sec.symbols ().begin ();
621
- for (auto *Sym : Sec.symbols ()) {
622
- if (Sym ->getAddress () < First->getAddress ())
623
- First = Sym ;
624
- if (Sym ->getAddress () > Last->getAddress ())
625
- Last = Sym ;
620
+ First = Last = *Sec.blocks ().begin ();
621
+ for (auto *B : Sec.blocks ()) {
622
+ if (B ->getAddress () < First->getAddress ())
623
+ First = B ;
624
+ if (B ->getAddress () > Last->getAddress ())
625
+ Last = B ;
626
626
}
627
627
}
628
- Symbol * getFirstSymbol () const {
628
+ Block * getFirstBlock () const {
629
629
assert ((!Last || First) && " First can not be null if end is non-null" );
630
630
return First;
631
631
}
632
- Symbol * getLastSymbol () const {
632
+ Block * getLastBlock () const {
633
633
assert ((First || !Last) && " Last can not be null if start is non-null" );
634
634
return Last;
635
635
}
@@ -638,17 +638,16 @@ class SectionRange {
638
638
return !First;
639
639
}
640
640
JITTargetAddress getStart () const {
641
- return First ? First->getBlock (). getAddress () : 0 ;
641
+ return First ? First->getAddress () : 0 ;
642
642
}
643
643
JITTargetAddress getEnd () const {
644
- return Last ? Last->getBlock ().getAddress () + Last->getBlock ().getSize ()
645
- : 0 ;
644
+ return Last ? Last->getAddress () + Last->getSize () : 0 ;
646
645
}
647
646
uint64_t getSize () const { return getEnd () - getStart (); }
648
647
649
648
private:
650
- Symbol *First = nullptr ;
651
- Symbol *Last = nullptr ;
649
+ Block *First = nullptr ;
650
+ Block *Last = nullptr ;
652
651
};
653
652
654
653
class LinkGraph {
0 commit comments