Skip to content

Commit a3326bc

Browse files
author
git apple-llvm automerger
committed
Merge commit '09feea972d0f' from llvm.org/master into apple/master
2 parents ee95055 + 09feea9 commit a3326bc

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)