[llvm] bd8c063 - [SjLjEHPrepare] Use getSigned() for call site number
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 07:05:49 PST 2025
Author: Nikita Popov
Date: 2025-12-09T16:02:39+01:00
New Revision: bd8c06387f1ca109c213967a7e5dad3cfb7537a3
URL: https://github.com/llvm/llvm-project/commit/bd8c06387f1ca109c213967a7e5dad3cfb7537a3
DIFF: https://github.com/llvm/llvm-project/commit/bd8c06387f1ca109c213967a7e5dad3cfb7537a3.diff
LOG: [SjLjEHPrepare] Use getSigned() for call site number
This may be -1.
Added:
Modified:
llvm/lib/CodeGen/SjLjEHPrepare.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
index 294b3de46966f..5856efcd549a8 100644
--- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
@@ -139,7 +139,7 @@ void SjLjEHPrepareImpl::insertCallSiteStore(Instruction *I, int Number) {
Builder.CreateGEP(FunctionContextTy, FuncCtx, Idxs, "call_site");
// Insert a store of the call-site number
- ConstantInt *CallSiteNoC = ConstantInt::get(DataTy, Number);
+ ConstantInt *CallSiteNoC = ConstantInt::getSigned(DataTy, Number);
Builder.CreateStore(CallSiteNoC, CallSite, true /*volatile*/);
}
More information about the llvm-commits
mailing list