SWDEV-360818: Reserved fields of hip structures are undefined. Because of that, reserved fields may contain special characters that are not readable by postprocessing Python script. To patch this issue, here we modify script that generates hip_ostream_ops.h to set reserved fields of hip structures to 0.

Change-Id: I0cda5cedfa30b140f121803dd8c066107ae0756e
Этот коммит содержится в:
Kiumars Sabeti
2023-01-24 18:27:58 -05:00
коммит произвёл Kiumars Sabeti
родитель 9acba8b4a1
Коммит 397b3b10af
+4 -1
Просмотреть файл
@@ -154,7 +154,10 @@ def process_struct(file_handle, cppHeader_struct, cppHeader, parent_hier_name, a
str += " if (std::string(\"" + cppHeader_struct + "::" + name + "\").find(" + apiname.upper() + "_structs_regex" + ") != std::string::npos) {\n"
indent = " "
str += indent + " std::operator<<(out, \"" + name + "=\");\n"
str += indent + " roctracer::" + apiname.lower() + "_support::detail::operator<<(out, v." + name + ");\n"
if (name == 'reserved' and apiname.upper() == 'HIP'):
str += indent + " roctracer::" + apiname.lower() + "_support::detail::operator<<(out, 0);\n"
else:
str += indent + " roctracer::" + apiname.lower() + "_support::detail::operator<<(out, v." + name + ");\n"
str += indent + " std::operator<<(out, \", \");\n"
str += " }\n"
if "void" not in mtype: