Skip to content

Conversation

@frobtech
Copy link
Contributor

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.

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.
@frobtech frobtech marked this pull request as ready for review October 28, 2025 18:56
@llvmbot llvmbot added the libc label Oct 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 28, 2025

@llvm/pr-subscribers-libc

Author: Roland McGrath (frobtech)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/165460.diff

1 Files Affected:

  • (modified) libc/utils/hdrgen/hdrgen/header.py (+3-3)
diff --git a/libc/utils/hdrgen/hdrgen/header.py b/libc/utils/hdrgen/hdrgen/header.py
index 2118db6e5fb75..967aa1fac5f22 100644
--- a/libc/utils/hdrgen/hdrgen/header.py
+++ b/libc/utils/hdrgen/hdrgen/header.py
@@ -241,7 +241,7 @@ 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()
+            ),
         }

@github-actions
Copy link

github-actions bot commented Oct 28, 2025

✅ With the latest revision this PR passed the Python code formatter.

@frobtech frobtech merged commit 10afda0 into llvm:main Oct 28, 2025
18 of 19 checks passed
@frobtech frobtech deleted the p/libc-hdrgen-json-includes branch October 28, 2025 20:16
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
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.
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants