[NFC] Switch a few uses of undef to poison as placeholders for unreachable code

This commit is contained in:
Nuno Lopes
2022-07-30 13:55:56 +01:00
parent 6b4c386b1e
commit fffabd5348
6 changed files with 9 additions and 9 deletions

View File

@@ -6337,7 +6337,7 @@ OutOfRecordLoop:
// We found at least one unresolved value. Nuke them all to avoid leaks.
for (unsigned i = ModuleValueListSize, e = ValueList.size(); i != e; ++i){
if ((A = dyn_cast_or_null<Argument>(ValueList[i])) && !A->getParent()) {
A->replaceAllUsesWith(UndefValue::get(A->getType()));
A->replaceAllUsesWith(PoisonValue::get(A->getType()));
delete A;
}
}