From d58317c7103ab1fb38aa0e07a8a778d6ab816e27 Mon Sep 17 00:00:00 2001 From: rkebichi <54912798+rkebichi@users.noreply.github.com> Date: Thu, 3 Oct 2019 15:46:09 -0400 Subject: [PATCH] Update kfdap.py [ROCm/roctracer commit: 9f304d364f66f4a8eaaa5e104e7dc8bedd3e26cd] --- projects/roctracer/script/kfdap.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/roctracer/script/kfdap.py b/projects/roctracer/script/kfdap.py index 4401de548f..eb4cb521bc 100755 --- a/projects/roctracer/script/kfdap.py +++ b/projects/roctracer/script/kfdap.py @@ -372,10 +372,11 @@ class API_DescrParser: self.content_h += 'struct kfd_api_data_t {\n' self.content_h += ' uint64_t correlation_id;\n' self.content_h += ' uint32_t phase;\n' - self.content_h += ' union {\n' - for ret_type in self.api_rettypes: - self.content_h += ' ' + ret_type + ' ' + ret_type + '_retval;\n' - self.content_h += ' };\n' + if len(self.api_rettypes) != 0: + self.content_h += ' union {\n' + for ret_type in self.api_rettypes: + self.content_h += ' ' + ret_type + ' ' + ret_type + '_retval;\n' + self.content_h += ' };\n' self.content_h += ' union {\n' return if call != '-':