[clang] [CodeGen] Change placeholder from `undef` to `poison` (PR #134731)
Pedro Lobo via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 7 14:04:39 PDT 2025
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/134731
Fill default values of a map with `poison` instead of `undef`. There should be no functional difference as the default values are overridden later.
>From de69ee35e12babf55f6a0212200431bf75340dc4 Mon Sep 17 00:00:00 2001
From: Pedro Lobo <pedro.lobo at tecnico.ulisboa.pt>
Date: Mon, 7 Apr 2025 21:55:23 +0100
Subject: [PATCH] [CodeGen] Change placeholder from `undef` to `poison`
Fill default values of a map with `poison` instead of `undef`.
There should be no functional difference as the default values are
overridden later.
---
clang/lib/CodeGen/MicrosoftCXXABI.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index ba5f74f153d59..7bef436302526 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -370,7 +370,7 @@ class MicrosoftCXXABI : public CGCXXABI {
MicrosoftVTableContext &VTContext = CGM.getMicrosoftVTableContext();
unsigned NumEntries = 1 + SrcRD->getNumVBases();
SmallVector<llvm::Constant *, 4> Map(NumEntries,
- llvm::UndefValue::get(CGM.IntTy));
+ llvm::PoisonValue::get(CGM.IntTy));
Map[0] = llvm::ConstantInt::get(CGM.IntTy, 0);
bool AnyDifferent = false;
for (const auto &I : SrcRD->vbases()) {
More information about the cfe-commits
mailing list