aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nuno.lopes@tecnico.ulisboa.pt>2024-11-19 15:18:40 +0000
committerNuno Lopes <nuno.lopes@tecnico.ulisboa.pt>2024-11-19 15:18:40 +0000
commitb0afa6bab9581abc91f23c854b3bb45095cbb057 (patch)
treeb6c5025205572b7ad9836b7872536787a9ff644c /clang/lib/CodeGen/CodeGenFunction.cpp
parent8e4423eb0888e5fe381a23ec1fa6969f2d096ed1 (diff)
downloadllvm-b0afa6bab9581abc91f23c854b3bb45095cbb057.zip
llvm-b0afa6bab9581abc91f23c854b3bb45095cbb057.tar.gz
llvm-b0afa6bab9581abc91f23c854b3bb45095cbb057.tar.bz2
[clang] Change some placeholders from undef to poison [NFC]
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp6
1 files changed, 3 insertions, 3 deletions
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<llvm::PHINode>(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");