This helps towards the effort to remove UndefValue from LLVM.
Related to https://discourse.llvm.org/t/auto-undef-debug-uses-of-a-deleted-value
Reviewed By: nlopes
Differential Revision: https://reviews.llvm.org/D140991
if (NewVM)
VM = NewVM;
else
- VM = ValueAsMetadata::get(UndefValue::get(VM->getValue()->getType()));
+ VM = ValueAsMetadata::get(PoisonValue::get(VM->getValue()->getType()));
}
}
if (Uniq) {
; CHECK-NOT: @s
-; CHECK: call void @llvm.dbg.value(metadata !DIArgList(ptr undef
+; CHECK: call void @llvm.dbg.value(metadata !DIArgList(ptr poison
%struct.S = type { i32 }