From d0f4144d2c3694bb806b18d17a907e6e6c065216 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 22 Apr 2019 19:14:27 +0000 Subject: [PATCH] Use const DebugLoc& git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358910 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/BranchRelaxation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/BranchRelaxation.cpp b/lib/CodeGen/BranchRelaxation.cpp index 3ad6266d4f3..15edc98c47f 100644 --- a/lib/CodeGen/BranchRelaxation.cpp +++ b/lib/CodeGen/BranchRelaxation.cpp @@ -300,7 +300,7 @@ bool BranchRelaxation::isBlockInRange( /// too far away to fit in its displacement field. It is converted to an inverse /// conditional branch + an unconditional branch to the destination. bool BranchRelaxation::fixupConditionalBranch(MachineInstr &MI) { - DebugLoc DL = MI.getDebugLoc(); + const DebugLoc &DL = MI.getDebugLoc(); MachineBasicBlock *MBB = MI.getParent(); MachineBasicBlock *TBB = nullptr, *FBB = nullptr; MachineBasicBlock *NewBB = nullptr; @@ -468,7 +468,7 @@ bool BranchRelaxation::fixupUnconditionalBranch(MachineInstr &MI) { MBB->replaceSuccessor(DestBB, BranchBB); } - DebugLoc DL = MI.getDebugLoc(); + const DebugLoc &DL = MI.getDebugLoc(); MI.eraseFromParent(); BlockInfo[BranchBB->getNumber()].Size += TII->insertIndirectBranch( *BranchBB, *DestBB, DL, DestOffset - SrcOffset, RS.get()); -- 2.50.1