From: David Blaikie Date: Tue, 3 Mar 2015 22:25:48 +0000 (+0000) Subject: Avoid copying LiveInterval, this could lead to a double-delete X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5f4b9f892bf87aa2fbc49f63799b3b69ced1a33c;p=oota-llvm.git Avoid copying LiveInterval, this could lead to a double-delete git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231154 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp b/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp index 4690177d029..5394875a6bc 100644 --- a/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp +++ b/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp @@ -319,7 +319,7 @@ void A57ChainingConstraint::addInterChainConstraint(PBQPRAGraph &G, unsigned Rd, static bool regJustKilledBefore(const LiveIntervals &LIs, unsigned reg, const MachineInstr &MI) { - LiveInterval LI = LIs.getInterval(reg); + const LiveInterval &LI = LIs.getInterval(reg); SlotIndex SI = LIs.getInstructionIndex(&MI); return LI.expiredAt(SI); }