git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252947
91177308-0d34-0410-b5e6-
96231b3b80d8
MachineBasicBlock &MBB, SmallVectorImpl<NullCheck> &NullCheckList) {
typedef TargetInstrInfo::MachineBranchPredicate MachineBranchPredicate;
- MDNode *BranchMD =
- MBB.getBasicBlock()
- ? MBB.getBasicBlock()->getTerminator()->getMetadata(LLVMContext::MD_make_implicit)
- : nullptr;
+ MDNode *BranchMD = nullptr;
+ if (auto *BB = MBB.getBasicBlock())
+ BranchMD = BB->getTerminator()->getMetadata(LLVMContext::MD_make_implicit);
+
if (!BranchMD)
return false;