[llvm-branch-commits] [clang] [compiler-rt] [llvm] [UBSan] Use -fsanitize-handler-preserve-all-regs in codegen (PR #168645)

Vitaly Buka via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Nov 25 12:46:36 PST 2025


================
@@ -23,10 +24,16 @@ class BoundsCheckingPass : public PassInfoMixin<BoundsCheckingPass> {
 public:
   struct Options {
     struct Runtime {
-      Runtime(bool MinRuntime, bool MayReturn)
-          : MinRuntime(MinRuntime), MayReturn(MayReturn) {}
+      Runtime(bool MinRuntime, bool MayReturn, bool HandlerPreserveAllRegs)
+          : MinRuntime(MinRuntime), MayReturn(MayReturn),
+            HandlerPreserveAllRegs(HandlerPreserveAllRegs) {}
       bool MinRuntime;
       bool MayReturn;
+      bool HandlerPreserveAllRegs;
+      bool shouldHandlerPreserveAllRegs(const Triple &T) const {
----------------
vitalybuka wrote:

No, I mean SanitizeHandlerPreserveAllRegs must be already correct

and codegen and LLVM will generated what ever they asked,


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


More information about the llvm-branch-commits mailing list