From 2b744665308fc8d30a3baecb4947f2bd81aa7d30 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 22 Apr 2019 19:14:27 +0000 Subject: [PATCH] Use const DebugLoc& llvm-svn: 358910 --- llvm/lib/CodeGen/BranchRelaxation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/BranchRelaxation.cpp b/llvm/lib/CodeGen/BranchRelaxation.cpp index 3ad6266..15edc98 100644 --- a/llvm/lib/CodeGen/BranchRelaxation.cpp +++ b/llvm/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.7.4