[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 23:16:17 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]>;
----------------
sivadeilra wrote:

Updated to use StrBoolAttr for both attributes.

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


More information about the llvm-commits mailing list