From 1fdf02ad5a4ca155017eea22688365a20aab077c Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 22 May 2025 08:07:52 -0700 Subject: [LLVM][CodeGen] Add convenience accessors for MachineFunctionProperties (#140002) Add per-property has/set/reset functions to MachineFunctionProperties. --- llvm/lib/CodeGen/MachineBasicBlock.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp') diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 37fe37f..76227b7 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1776,17 +1776,15 @@ void MachineBasicBlock::clearLiveIns( } MachineBasicBlock::livein_iterator MachineBasicBlock::livein_begin() const { - assert(getParent()->getProperties().hasProperty( - MachineFunctionProperties::Property::TracksLiveness) && - "Liveness information is accurate"); + assert(getParent()->getProperties().hasTracksLiveness() && + "Liveness information is accurate"); return LiveIns.begin(); } MachineBasicBlock::liveout_iterator MachineBasicBlock::liveout_begin() const { const MachineFunction &MF = *getParent(); - assert(MF.getProperties().hasProperty( - MachineFunctionProperties::Property::TracksLiveness) && - "Liveness information is accurate"); + assert(MF.getProperties().hasTracksLiveness() && + "Liveness information is accurate"); const TargetLowering &TLI = *MF.getSubtarget().getTargetLowering(); MCRegister ExceptionPointer, ExceptionSelector; -- cgit v1.1