From aeae703b4df23062d7b28c70baf8a0ff45873d98 Mon Sep 17 00:00:00 2001 From: Manuel Brito Date: Thu, 8 Sep 2022 11:35:59 +0100 Subject: [PATCH] [unittests] Change operands of Add in AsmWriterTest from Undef to Poison Replacing UndefValue with PoisonValue in this test where it's use as dummy value in light of the efforts to remove undef from llvm. Differential Revision: https://reviews.llvm.org/D133481 --- llvm/unittests/IR/AsmWriterTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/unittests/IR/AsmWriterTest.cpp b/llvm/unittests/IR/AsmWriterTest.cpp index 4fa1889..c8b5379 100644 --- a/llvm/unittests/IR/AsmWriterTest.cpp +++ b/llvm/unittests/IR/AsmWriterTest.cpp @@ -24,14 +24,14 @@ TEST(AsmWriterTest, DebugPrintDetachedInstruction) { // has metadata attached but no parent. LLVMContext Ctx; auto Ty = Type::getInt32Ty(Ctx); - auto Undef = UndefValue::get(Ty); - std::unique_ptr Add(BinaryOperator::CreateAdd(Undef, Undef)); + auto Poison = PoisonValue::get(Ty); + std::unique_ptr Add(BinaryOperator::CreateAdd(Poison, Poison)); Add->setMetadata( "", MDNode::get(Ctx, {ConstantAsMetadata::get(ConstantInt::get(Ty, 1))})); std::string S; raw_string_ostream OS(S); Add->print(OS); - std::size_t r = OS.str().find(" = add i32 undef, undef, ! = add i32 poison, poison, !