From: Manuel Brito Date: Thu, 8 Sep 2022 10:35:59 +0000 (+0100) Subject: [unittests] Change operands of Add in AsmWriterTest from Undef to Poison X-Git-Tag: upstream/17.0.6~34083 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aeae703b4df23062d7b28c70baf8a0ff45873d98;p=platform%2Fupstream%2Fllvm.git [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 --- 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, !