================
@@ -3615,9 +3616,12 @@ void CodeGenFunction::EmitCheck(
 
     if (!CGM.getCodeGenOpts().SanitizeMergeHandlers.has(Checked[i].second))
       NoMerge = true;
+
+    if (!CGM.getCodeGenOpts().NoSanitizeTopHot.has(Checked[i].second))
+      SanitizeGuardChecks = true;
   }
 
-  if (ClSanitizeGuardChecks) {
+  if (SanitizeGuardChecks) {
     llvm::Value *Allow =
         
Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::allow_ubsan_check),
                            llvm::ConstantInt::get(CGM.Int8Ty, CheckHandler));
----------------
thurstond wrote:

Instead of passing CheckHandler, can I pass the sanitizer cutoff threshold 
instead?

Something like
```
        Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::allow_ubsan_check),
                           llvm::ConstantInt::get(CGM.Int8Ty, 
NoSanitizeTopHot[someIndex]));
```

https://github.com/llvm/llvm-project/pull/121619
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to