It's no longer necessary to test if a MachineBasicBlock's
authorDan Gohman <gohman@apple.com>
Tue, 8 Jul 2008 23:59:09 +0000 (23:59 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 8 Jul 2008 23:59:09 +0000 (23:59 +0000)
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

lib/CodeGen/MachineInstr.cpp

index 38176b0c13202b05bc799a04c9eff483bf64cae1..e9a8c63abdc629cf564d381f64308098daba5f5a 100644 (file)
@@ -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;
 }