venus: fix two VN_TRACE_SCOPE's in the same scope

Make sure __LINE__ is expanded.

Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14960>
This commit is contained in:
Chia-I Wu
2022-02-09 14:07:32 -08:00
committed by Marge Bot
parent 987bc44954
commit f93059b19f
+4 -1
View File
@@ -67,8 +67,11 @@
#if __has_attribute(cleanup) && __has_attribute(unused)
#define VN_TRACE_SCOPE_VAR_CONCAT(name, suffix) name##suffix
#define VN_TRACE_SCOPE_VAR(suffix) \
VN_TRACE_SCOPE_VAR_CONCAT(_vn_trace_scope_, suffix)
#define VN_TRACE_SCOPE(name) \
int _vn_trace_scope_##__LINE__ \
int VN_TRACE_SCOPE_VAR(__LINE__) \
__attribute__((cleanup(vn_trace_scope_end), unused)) = \
vn_trace_scope_begin(name)