[clang] [CodeGen] Change placeholder from `undef` to `poison` (PR #134731)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 7 14:05:12 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-codegen

Author: Pedro Lobo (pedroclobo)

<details>
<summary>Changes</summary>

Fill default values of a map with `poison` instead of `undef`. There should be no functional difference as the default values are overridden later.

---
Full diff: https://github.com/llvm/llvm-project/pull/134731.diff


1 Files Affected:

- (modified) clang/lib/CodeGen/MicrosoftCXXABI.cpp (+1-1) 


``````````diff
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()) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/134731


More information about the cfe-commits mailing list