Skip to content

Commit 69d0746

Browse files
committed
[Lint] Use poison instead of undef for self-referential values
1 parent 29e0f04 commit 69d0746

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/Lint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk,
647647
SmallPtrSetImpl<Value *> &Visited) const {
648648
// Detect self-referential values.
649649
if (!Visited.insert(V).second)
650-
return UndefValue::get(V->getType());
650+
return PoisonValue::get(V->getType());
651651

652652
// TODO: Look through sext or zext cast, when the result is known to
653653
// be interpreted as signed or unsigned, respectively.

0 commit comments

Comments
 (0)