From: James Molloy Date: Tue, 26 Aug 2014 13:41:31 +0000 (+0000) Subject: Change the return value of "getEnd()" from a MachineInstr* to a MachineBasicBlock... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=698eabd8b73782cbdeba047e674e4913a1da441c Change the return value of "getEnd()" from a MachineInstr* to a MachineBasicBlock::iterator. It seems on Darwin the illegal round-trip ::iterator -> MachineInstr* -> ::iterator breaks execution horribly when the iterator is not a real MachineInstr, like ::end(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216455 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp b/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp index dc8cb32d199..caf4ca3e3db 100644 --- a/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp +++ b/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp @@ -234,7 +234,7 @@ public: MachineInstr *getKill() const { return KillInst; } /// Return an instruction that can be used as an iterator for the end /// of the chain. This is the maximum of KillInst (if set) and LastInst. - MachineInstr *getEnd() const { + MachineBasicBlock::iterator getEnd() const { return ++MachineBasicBlock::iterator(KillInst ? KillInst : LastInst); }