Skip to content

Commit

Permalink
Use object directly instead of accessing ArrayRef (#83263)
Browse files Browse the repository at this point in the history
Use RegOp directly inside debug code to silence a static analyzer that
warns about accessing it through its ArrayRef wrapper.
  • Loading branch information
MartinWehking committed Mar 1, 2024
1 parent 924ad19 commit dfec4ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ MachineBasicBlock *AMDGPUMachineCFGStructurizer::createIfRegion(
MachineOperand::CreateReg(Reg, false, false, true);
ArrayRef<MachineOperand> Cond(RegOp);
LLVM_DEBUG(dbgs() << "RegionExitReg: ");
LLVM_DEBUG(Cond[0].print(dbgs(), TRI));
LLVM_DEBUG(RegOp.print(dbgs(), TRI));
LLVM_DEBUG(dbgs() << "\n");
TII->insertBranch(*RegionExit, CurrentRegion->getEntry(), RegionExit,
Cond, DebugLoc());
Expand Down

0 comments on commit dfec4ef

Please sign in to comment.