From b0afa6bab9581abc91f23c854b3bb45095cbb057 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Tue, 19 Nov 2024 15:18:40 +0000 Subject: [clang] Change some placeholders from undef to poison [NFC] --- clang/lib/CodeGen/CodeGenFunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 6a2f82f..e2437d1 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -486,7 +486,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { if (IndirectBranch) { llvm::PHINode *PN = cast(IndirectBranch->getAddress()); if (PN->getNumIncomingValues() == 0) { - PN->replaceAllUsesWith(llvm::UndefValue::get(PN->getType())); + PN->replaceAllUsesWith(llvm::PoisonValue::get(PN->getType())); PN->eraseFromParent(); } } @@ -1106,8 +1106,8 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, // Create a marker to make it easy to insert allocas into the entryblock // later. Don't create this with the builder, because we don't want it // folded. - llvm::Value *Undef = llvm::UndefValue::get(Int32Ty); - AllocaInsertPt = new llvm::BitCastInst(Undef, Int32Ty, "allocapt", EntryBB); + llvm::Value *Poison = llvm::PoisonValue::get(Int32Ty); + AllocaInsertPt = new llvm::BitCastInst(Poison, Int32Ty, "allocapt", EntryBB); ReturnBlock = getJumpDestInCurrentScope("return"); -- cgit v1.1