Skip to content

Commit 98fb99d

Browse files
author
git apple-llvm automerger
committed
Merge commit 'a3326bce8a44' from apple/master into swift/master-next
2 parents 0f4b978 + a3326bc commit 98fb99d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/IR/Constants.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,9 @@ void Constant::removeDeadConstantUsers() const {
596596
}
597597

598598
Constant *Constant::replaceUndefsWith(Constant *C, Constant *Replacement) {
599+
assert(C && Replacement && "Expected non-nullptr constant arguments");
599600
Type *Ty = C->getType();
600-
if (C && match(C, m_Undef())) {
601+
if (match(C, m_Undef())) {
601602
assert(Ty == Replacement->getType() && "Expected matching types");
602603
return Replacement;
603604
}

0 commit comments

Comments
 (0)