SWDEV-283958 Workaround for unnamed structs
CppHeaderParser has limited support for unnamed structs. It leaves the
name empty so this results in classes (a.k.a structs) having trailing '::'
characters, also giving no way to distingush two unnamed structs at the
same level of nesting. An example are the inner structs of
hipExternalSemaphoreSignalParams. The workaround consists in skipping
over these, so they are not generated in the output header file
which lists all ostream ops<<. Only the inner unnamed structs are skipped,
the rest is processed as it should.
Change-Id: I17439c46095469b7adb7aee0b0f0b3d234aabc11
[ROCm/roctracer commit: faada3e569]
This commit is contained in:
@@ -147,6 +147,7 @@ def gen_cppheader(infilepath, outfilepath, rank):
|
||||
output_filename_h.write("// End of basic ostream ops\n\n")
|
||||
|
||||
for c in cppHeader.classes:
|
||||
if c[-2] == ':' and c[-1] == ':': continue #ostream operator cannot be overloaded for anonymous struct therefore it is skipped
|
||||
if "union" in c:
|
||||
continue
|
||||
if c in structs_analyzed:
|
||||
|
||||
مرجع در شماره جدید
Block a user