aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-06-24 16:29:23 +0200
committerNikita Popov <npopov@redhat.com>2024-06-24 16:32:03 +0200
commit69d07465c5cb0194d15dfe75b058957fd6ab16c8 (patch)
tree8a281c58531d37ca2a86cc88c371f3fc76eb7b84
parent29e0f046735010540fbdba4371dcd26f9e437650 (diff)
downloadllvm-69d07465c5cb0194d15dfe75b058957fd6ab16c8.zip
llvm-69d07465c5cb0194d15dfe75b058957fd6ab16c8.tar.gz
llvm-69d07465c5cb0194d15dfe75b058957fd6ab16c8.tar.bz2
[Lint] Use poison instead of undef for self-referential values
-rw-r--r--llvm/lib/Analysis/Lint.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Lint.cpp b/llvm/lib/Analysis/Lint.cpp
index 1ab856a..e9ed0c2 100644
--- a/llvm/lib/Analysis/Lint.cpp
+++ b/llvm/lib/Analysis/Lint.cpp
@@ -647,7 +647,7 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk,
SmallPtrSetImpl<Value *> &Visited) const {
// Detect self-referential values.
if (!Visited.insert(V).second)
- return UndefValue::get(V->getType());
+ return PoisonValue::get(V->getType());
// TODO: Look through sext or zext cast, when the result is known to
// be interpreted as signed or unsigned, respectively.