Skip to content

Commit 10afda0

Browse files
authored
[libc][hdrgen] Fix includes sorting in JSON emission (llvm#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.
1 parent 303fba0 commit 10afda0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libc/utils/hdrgen/hdrgen/header.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,5 @@ def json_data(self):
241241
return {
242242
"name": self.name,
243243
"standards": self.standards,
244-
"includes": [
245-
str(file) for file in sorted({COMMON_HEADER} | self.includes())
246-
],
244+
"includes": sorted(str(file) for file in {COMMON_HEADER} | self.includes()),
247245
}

0 commit comments

Comments
 (0)