[clang] [ubsan] Allow -ubsan-unique-traps option for non-trap handlers (PR #119302)

Thurston Dang via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 9 18:54:30 PST 2024


================
@@ -3581,6 +3581,13 @@ static void emitCheckHandlerCall(CodeGenFunction &CGF,
                                llvm::AttributeList::FunctionIndex, B),
       /*Local=*/true);
   llvm::CallInst *HandlerCall = CGF.EmitNounwindRuntimeCall(Fn, FnArgs);
+  bool NoMerge =
+      ClSanitizeDebugDeoptimization ||
+      !CGF.CGM.getCodeGenOpts().OptimizationLevel ||
+      (CGF.CurCodeDecl && CGF.CurCodeDecl->hasAttr<OptimizeNoneAttr>());
+  // Regular runtime provides a backtrace, making NoMerge a waste of space
----------------
thurstond wrote:

Thanks, fixed

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


More information about the cfe-commits mailing list