[PATCH] D19909: [Attr] Add support for the `ms_hook_prologue` attribute.

Charles Davis via cfe-commits cfe-commits at lists.llvm.org
Thu May 19 13:36:08 PDT 2016


cdavis5x added a comment.

For now, I've disallowed it with `naked` and `always_inline`/`__forceinline` attributes. Do any other attributes affect prologue generation in a way that might interfere with `ms_hook_prologue`? AFAICT, GCC only disallows `ms_hook_prologue` on a) nested functions and b) functions compiled with `-mfentry` (neither of which we support, AFAIK).


================
Comment at: include/clang/Basic/Attr.td:2032
@@ -2031,1 +2031,3 @@
 
+def MSHookPrologue : InheritableAttr {
+  let Spellings = [GCC<"ms_hook_prologue">];
----------------
aaron.ballman wrote:
> I am wondering whether we want this to be a target-specific attribute or not. Right now, this attribute will be silently accepted for CPUs that MSVC does not support, for instance. If we made the attribute target-specific, then users would get appropriate diagnostics for those architectures.
For now, I've limited it to architectures that Windows supports.


http://reviews.llvm.org/D19909





More information about the cfe-commits mailing list