[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 17 17:19:44 PDT 2025
================
@@ -389,6 +389,17 @@ def CoroDestroyOnlyWhenComplete : EnumAttr<"coro_only_destroy_when_complete", In
/// pipeline to perform elide on the call or invoke instruction.
def CoroElideSafe : EnumAttr<"coro_elide_safe", IntersectPreserve, [FnAttr]>;
+/// Function is marked for Windows Hot Patching
+def MarkedForWindowsSecureHotPatching
+ : EnumAttr<"marked_for_windows_hot_patching", IntersectPreserve, [FnAttr]>;
+
+/// Global variable should not be accessed through a "__ref_" global variable in
+/// a hot patching function This attribute is applied to the global variable
+/// decl, not the hotpatched function.
+def AllowDirectAccessInHotPatchFunction
+ : EnumAttr<"allow_direct_access_in_hot_patch_function",
+ IntersectPreserve, [FnAttr]>;
----------------
efriedma-quic wrote:
Do we really need to allocate enum values for this? Would a string attribute be sufficient? The primary benefit of using EnumAttr over StrBoolAttr is that it's a bit faster to query... but we store the attributes as a bit array, so it's taking up space for everyone.
https://github.com/llvm/llvm-project/pull/138972
More information about the cfe-commits
mailing list