[llvm-branch-commits] [clang] [Clang] Add __builtin_allow_sanitize_check() (PR #172030)
Alexander Potapenko via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 15 08:12:14 PST 2025
================
@@ -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") {
----------------
ramosian-glider wrote:
Won't this provoke the users to use "address" and "kernel-address" interchangeably?
If we want this, maybe it should be reflected in the documentation?
https://github.com/llvm/llvm-project/pull/172030
More information about the llvm-branch-commits
mailing list