================
@@ -3549,6 +3549,38 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl 
GD, unsigned BuiltinID,
         llvm::MetadataAsValue::get(Ctx, llvm::MDString::get(Ctx, Kind)));
     return RValue::get(Allow);
   }
+  case Builtin::BI__builtin_allow_sanitize_check: {
+    Intrinsic::ID IntrID = Intrinsic::not_intrinsic;
+    StringRef SanitizerName =
+        cast<StringLiteral>(E->getArg(0)->IgnoreParenCasts())->getString();
+
+    if (SanitizerName == "address" || SanitizerName == "kernel-address") {
----------------
melver wrote:

I checked, and we appear to allow that for no_sanitize deliberately as well 
(and in the kernel code we actually use `no_sanitize("address")` and not 
`no_sanitize("kernel-address")`).

For consistency, I think we have to allow the interchangeable behaviour. I 
added a comment above to refer to the no_sanitize attribute.

https://github.com/llvm/llvm-project/pull/172030
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to