From: Dan Gohman Date: Tue, 8 Jul 2008 23:59:09 +0000 (+0000) Subject: It's no longer necessary to test if a MachineBasicBlock's X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4e526b9a5b36d9bac170c03df0a5d6fb76740ae2;p=oota-llvm.git It's no longer necessary to test if a MachineBasicBlock's parent is non-null. It now always is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53263 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 38176b0c132..e9a8c63abdc 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -348,8 +348,7 @@ int MachineInstr::getOpcode() const { /// return null. MachineRegisterInfo *MachineInstr::getRegInfo() { if (MachineBasicBlock *MBB = getParent()) - if (MachineFunction *MF = MBB->getParent()) - return &MF->getRegInfo(); + return &MBB->getParent()->getRegInfo(); return 0; }