[NFCI][SimplifyCFG] simplifySingleResume(): use DeleteDeadBlock()
authorRoman Lebedev <lebedev.ri@gmail.com>
Wed, 19 May 2021 08:49:16 +0000 (11:49 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Wed, 19 May 2021 09:04:22 +0000 (12:04 +0300)
llvm/lib/Transforms/Utils/SimplifyCFG.cpp

index add7a64..940f9c5 100644 (file)
@@ -4426,10 +4426,7 @@ bool SimplifyCFGOpt::simplifySingleResume(ResumeInst *RI) {
   }
 
   // The landingpad is now unreachable.  Zap it.
-  if (DTU)
-    DTU->deleteBB(BB);
-  else
-    BB->eraseFromParent();
+  DeleteDeadBlock(BB, DTU);
   return true;
 }