[clang] [clang] Change placeholder from `undef` to `poison` (PR #131533)
Pedro Lobo via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 16 11:30:24 PDT 2025
https://github.com/pedroclobo created https://github.com/llvm/llvm-project/pull/131533
Return a `poison` value, instead of `undef`, if there is no available SEH info.
>From 6c231b0dba091d6f7c5b79a92dedeeb56166fd8f Mon Sep 17 00:00:00 2001
From: Pedro Lobo <pedro.lobo at tecnico.ulisboa.pt>
Date: Wed, 15 Jan 2025 20:14:30 +0000
Subject: [PATCH] [clang] Change placeholder from `undef` to `poison`
Return a `poison` value, instead of `undef`, if there is no available
SEH info.
---
clang/lib/CodeGen/CGException.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 5a395c924333e..b4b8c2952b02b 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -2145,7 +2145,7 @@ llvm::Value *CodeGenFunction::EmitSEHExceptionInfo() {
// Sema should diagnose calling this builtin outside of a filter context, but
// don't crash if we screw up.
if (!SEHInfo)
- return llvm::UndefValue::get(Int8PtrTy);
+ return llvm::PoisonValue::get(Int8PtrTy);
assert(SEHInfo->getType() == Int8PtrTy);
return SEHInfo;
}
More information about the cfe-commits
mailing list