summary refs log tree commit diff stats
path: root/include/qemu/compiler.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-12-16 12:53:44 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2023-09-26 18:09:08 +0200
commitd79b9202e45711e37e5ba5b3fbfccb4b9fff78a1 (patch)
treea64d570d91870a2f9d063affec21d75f1b65d9f4 /include/qemu/compiler.h
parente2dbca033710efea20b0b0a26ca05570dcdabd49 (diff)
downloadfocaccia-qemu-d79b9202e45711e37e5ba5b3fbfccb4b9fff78a1.tar.gz
focaccia-qemu-d79b9202e45711e37e5ba5b3fbfccb4b9fff78a1.zip
compiler: introduce QEMU_ANNOTATE
Allow a more shorter syntax when defining wrapper macros for
__attribute__((annotate(...))).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/compiler.h')
-rw-r--r--include/qemu/compiler.h6
1 files changed, 6 insertions, 0 deletions
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 */