From d79b9202e45711e37e5ba5b3fbfccb4b9fff78a1 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 16 Dec 2022 12:53:44 +0100 Subject: compiler: introduce QEMU_ANNOTATE Allow a more shorter syntax when defining wrapper macros for __attribute__((annotate(...))). Signed-off-by: Paolo Bonzini --- include/qemu/compiler.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/qemu/compiler.h') diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index a309f90c76..7fda29b445 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -197,4 +197,10 @@ #define BUILTIN_SUBCLL_BROKEN #endif +#if __has_attribute(annotate) +#define QEMU_ANNOTATE(x) __attribute__((annotate(x))) +#else +#define QEMU_ANNOTATE(x) +#endif + #endif /* COMPILER_H */ -- cgit 1.4.1