[libc][hdrgen] Fix includes sorting in JSON emission (#165460)

The JSON output support in hdrgen had a bug that tripped when
used with headers that use special-case headers like <stdint.h>
to supply some times, as well as llvm-libc-types/*.h headers.
This commit is contained in:
Roland McGrath
2025-10-28 13:16:20 -07:00
committed by GitHub
parent 303fba0214
commit 10afda0796

View File

@@ -241,7 +241,5 @@ class HeaderFile:
return {
"name": self.name,
"standards": self.standards,
"includes": [
str(file) for file in sorted({COMMON_HEADER} | self.includes())
],
"includes": sorted(str(file) for file in {COMMON_HEADER} | self.includes()),
}