diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index f7684ae..a2c955e 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -558,6 +558,11 @@ void MachineBasicBlock::printName(raw_ostream &os, unsigned printNameFlags, } hasAttributes = true; } + if (getBBID().has_value()) { + os << (hasAttributes ? ", " : " ("); + os << "bb_id " << *getBBID(); + hasAttributes = true; + } } if (hasAttributes) @@ -1646,6 +1651,11 @@ bool MachineBasicBlock::sizeWithoutDebugLargerThan(unsigned Limit) const { return false; } +unsigned MachineBasicBlock::getBBIDOrNumber() const { + uint8_t BBAddrMapVersion = getParent()->getContext().getBBAddrMapVersion(); + return BBAddrMapVersion < 2 ? getNumber() : *getBBID(); +} + const MBBSectionID MBBSectionID::ColdSectionID(MBBSectionID::SectionType::Cold); const MBBSectionID MBBSectionID::ExceptionSectionID(MBBSectionID::SectionType::Exception); |