[libc-commits] [libc] 10afda0 - [libc][hdrgen] Fix `includes` sorting in JSON emission (#165460)
via libc-commits
libc-commits at lists.llvm.org
Tue Oct 28 13:16:24 PDT 2025
Author: Roland McGrath
Date: 2025-10-28T13:16:20-07:00
New Revision: 10afda0796cf543390fa5670d757b3ff7a558224
URL: https://github.com/llvm/llvm-project/commit/10afda0796cf543390fa5670d757b3ff7a558224
DIFF: https://github.com/llvm/llvm-project/commit/10afda0796cf543390fa5670d757b3ff7a558224.diff
LOG: [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.
Added:
Modified:
libc/utils/hdrgen/hdrgen/header.py
Removed:
################################################################################
diff --git a/libc/utils/hdrgen/hdrgen/header.py b/libc/utils/hdrgen/hdrgen/header.py
index 2118db6e5fb75..715d4b7c9b7ed 100644
--- a/libc/utils/hdrgen/hdrgen/header.py
+++ b/libc/utils/hdrgen/hdrgen/header.py
@@ -241,7 +241,5 @@ def json_data(self):
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()),
}
More information about the libc-commits
mailing list