Skip to content

Commit 824113f

Browse files
committed
[LLParser] Use poison instead of undef when cleaning up forward refs
1 parent b644726 commit 824113f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3546,15 +3546,15 @@ LLParser::PerFunctionState::~PerFunctionState() {
35463546
if (isa<BasicBlock>(P.second.first))
35473547
continue;
35483548
P.second.first->replaceAllUsesWith(
3549-
UndefValue::get(P.second.first->getType()));
3549+
PoisonValue::get(P.second.first->getType()));
35503550
P.second.first->deleteValue();
35513551
}
35523552

35533553
for (const auto &P : ForwardRefValIDs) {
35543554
if (isa<BasicBlock>(P.second.first))
35553555
continue;
35563556
P.second.first->replaceAllUsesWith(
3557-
UndefValue::get(P.second.first->getType()));
3557+
PoisonValue::get(P.second.first->getType()));
35583558
P.second.first->deleteValue();
35593559
}
35603560
}

0 commit comments

Comments
 (0)