Skip to content

Commit 0cb1083

Browse files
authored
Merge branch 'main' into fixup/prof-missing-atomic-expand
2 parents 0366285 + 2b4ac66 commit 0cb1083

File tree

2,312 files changed

+110793
-35767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,312 files changed

+110793
-35767
lines changed

.ci/generate_test_report_lib.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ def _parse_ninja_log(ninja_log: list[str]) -> list[tuple[str, str]]:
4141
# touch test/4.stamp
4242
#
4343
# index will point to the line that starts with Failed:. The progress
44-
# indicator is the line before this ([4/5] test/4.stamp) and contains a pretty
45-
# printed version of the target being built (test/4.stamp). We use this line
46-
# and remove the progress information to get a succinct name for the target.
47-
failing_action = ninja_log[index - 1].split("] ")[1]
44+
# indicator is sometimes the line before this ([4/5] test/4.stamp) and
45+
# will contain a pretty printed version of the target being built
46+
# (test/4.stamp) when accurate. We instead parse the failed line rather
47+
# than the progress indicator as the progress indicator may not be
48+
# aligned with the failure.
49+
failing_action = ninja_log[index].split("FAILED: ")[1]
4850
failure_log = []
4951
while (
5052
index < len(ninja_log)

.ci/generate_test_report_lib_test.py

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_find_failure_ninja_logs(self):
3939
self.assertEqual(
4040
failures[0],
4141
(
42-
"test/4.stamp",
42+
"touch test/4.stamp",
4343
dedent(
4444
"""\
4545
FAILED: touch test/4.stamp
@@ -77,7 +77,7 @@ def test_ninja_log_end(self):
7777
self.assertEqual(
7878
failures[0],
7979
(
80-
"test/3.stamp",
80+
"touch test/3.stamp",
8181
dedent(
8282
"""\
8383
FAILED: touch test/3.stamp
@@ -106,7 +106,7 @@ def test_ninja_log_multiple_failures(self):
106106
self.assertEqual(
107107
failures[0],
108108
(
109-
"test/2.stamp",
109+
"touch test/2.stamp",
110110
dedent(
111111
"""\
112112
FAILED: touch test/2.stamp
@@ -117,7 +117,7 @@ def test_ninja_log_multiple_failures(self):
117117
self.assertEqual(
118118
failures[1],
119119
(
120-
"test/4.stamp",
120+
"touch test/4.stamp",
121121
dedent(
122122
"""\
123123
FAILED: touch test/4.stamp
@@ -150,7 +150,7 @@ def test_ninja_log_runtimes_failure(self):
150150
self.assertEqual(
151151
failures[0],
152152
(
153-
"test/2.stamp",
153+
"touch test/2.stamp",
154154
dedent(
155155
"""\
156156
FAILED: touch test/2.stamp
@@ -159,6 +159,34 @@ def test_ninja_log_runtimes_failure(self):
159159
),
160160
)
161161

162+
# Test that we correctly handle cases where the FAILED: line does not
163+
# match up with the progress indicator.
164+
def test_ninja_log_mismatched_failed(self):
165+
failures = generate_test_report_lib.find_failure_in_ninja_logs(
166+
[
167+
[
168+
"[1/5] test/1.stamp",
169+
"[2/5] test/2.stamp",
170+
"ModuleNotFoundError: No module named 'mount_langley'",
171+
"FAILED: tools/check-langley",
172+
"Wow! This system is really broken!",
173+
"[5/5] test/5.stamp",
174+
]
175+
]
176+
)
177+
self.assertEqual(len(failures), 1)
178+
self.assertEqual(
179+
failures[0],
180+
(
181+
"tools/check-langley",
182+
dedent(
183+
"""\
184+
FAILED: tools/check-langley
185+
Wow! This system is really broken!"""
186+
),
187+
),
188+
)
189+
162190
def test_title_only(self):
163191
self.assertEqual(
164192
generate_test_report_lib.generate_report("Foo", 0, [], []),
@@ -407,7 +435,6 @@ def test_no_failures_multiple_build_failed_ninja_log(self):
407435
]
408436
],
409437
)
410-
print(test)
411438
self.assertEqual(
412439
generate_test_report_lib.generate_report(
413440
"Foo",
@@ -449,15 +476,15 @@ def test_no_failures_multiple_build_failed_ninja_log(self):
449476
All tests passed but another part of the build **failed**. Click on a failure below to see the details.
450477
451478
<details>
452-
<summary>test/2.stamp</summary>
479+
<summary>touch test/2.stamp</summary>
453480
454481
```
455482
FAILED: touch test/2.stamp
456483
Wow! Be Kind!
457484
```
458485
</details>
459486
<details>
460-
<summary>test/4.stamp</summary>
487+
<summary>touch test/4.stamp</summary>
461488
462489
```
463490
FAILED: touch test/4.stamp

.ci/premerge_advisor_explain.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def main(commit_sha: str, build_log_files: list[str]):
4040
explanation_request["failures"].append(
4141
{"name": name, "message": failure_message}
4242
)
43-
advisor_response = requests.get(PREMERGE_ADVISOR_URL, json=explanation_request)
43+
advisor_response = requests.get(
44+
PREMERGE_ADVISOR_URL, json=explanation_request, timeout=5
45+
)
4446
if advisor_response.status_code == 200:
4547
print(advisor_response.json())
4648
else:

.ci/premerge_advisor_upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def main(commit_sha, workflow_run_number, build_log_files):
4545
for name, failure_message in ninja_failures:
4646
failure_info["failures"].append({"name": name, "message": failure_message})
4747
for premerge_advisor_url in PREMERGE_ADVISOR_URLS:
48-
requests.post(premerge_advisor_url, json=failure_info)
48+
requests.post(premerge_advisor_url, json=failure_info, timeout=5)
4949

5050

5151
if __name__ == "__main__":
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
applyTo: lldb/**/*
3+
---
4+
5+
When reviewing code, focus on:
6+
7+
## Language, Libraries & Standards
8+
9+
- Target C++17 and avoid vendor-specific extensions.
10+
- For Python scripts, follow PEP 8.
11+
- Prefer standard library or LLVM support libraries instead of reinventing data structures.
12+
13+
## Comments & Documentation
14+
15+
- Each source file should include the standard LLVM file header.
16+
- Header files must have proper header guards.
17+
- Non-trivial classes and public methods should have Doxygen documentation.
18+
- Use `//` or `///` comments normally; avoid block comments unless necessary.
19+
- Non-trivial code should have comments explaining what it does and why. Avoid comments that explain how it does it at a micro level.
20+
21+
## Language & Compiler Issues
22+
23+
- Write portable code; wrap non-portable code in interfaces.
24+
- Do not use RTTI or exceptions.
25+
- Prefer C++-style casts over C-style casts.
26+
- Do not use static constructors.
27+
- Use `class` or `struct` consistently; `struct` only for all-public data.
28+
- When then same class is declared or defined multiple times, make sure it's consistently done using either `class` or `struct`.
29+
30+
## Headers & Library Layering
31+
32+
- Include order: module header → local/private headers → project headers → system headers.
33+
- Headers must compile standalone (include all dependencies).
34+
- Maintain proper library layering; avoid circular dependencies.
35+
- Include minimally; use forward declarations where possible.
36+
- Keep internal headers private to modules.
37+
- Use full namespace qualifiers for out-of-line definitions.
38+
39+
## Control Flow & Structure
40+
41+
- Prefer early exits over deep nesting.
42+
- Do not use `else` after `return`, `continue`, `break`, or `goto`.
43+
- Encapsulate loops that compute predicates into helper functions.
44+
45+
## Naming
46+
47+
- LLDB's code style differs from LLVM's coding style.
48+
- Variables are `snake_case`.
49+
- Functions and methods are `UpperCamelCase`.
50+
- Static, global and member variables have `s_`, `g_` and `m_` prefixes respectively.
51+
52+
## General Guidelines
53+
54+
- Use `assert` liberally; prefer `llvm_unreachable` for unreachable states.
55+
- Do not use `using namespace std;` in headers.
56+
- Provide a virtual method anchor for classes defined in headers.
57+
- Do not use default labels in fully covered switches over enumerations.
58+
- Use range-based for loops wherever possible.
59+
- Capture `end()` outside loops if not using range-based iteration.
60+
- Including `<iostream>` is forbidded. Use LLVM’s `raw_ostream` instead.
61+
- Don’t use `inline` when defining a function in a class definition.
62+
63+
## Microscopic Details
64+
65+
- Preserve existing style in modified code.
66+
- Prefer pre-increment (`++i`) when value is unused.
67+
- Use `private`, `protected`, or `public` keyword as appropriate to restrict class member visibility.
68+
- Omit braces for single-statement `if`, `else`, `while`, `for` unless needed.
69+
70+
## Review Style
71+
72+
- Be specific and actionable in feedback.
73+
- Explain the "why" behind recommendations.
74+
- Link back to the LLVM Coding Standards: https://llvm.org/docs/CodingStandards.html.
75+
- Ask clarifying questions when code intent is unclear.
76+
77+
Ignore formatting and assume that's handled by external tools like `clang-format` and `black`.
78+
Remember that these standards are **guidelines**.
79+
Always prioritize consistency with the style that is already being used by the surrounding code.

.github/copilot-instructions.md renamed to .github/instructions/llvm.instructions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
applyTo: llvm/**/*
3+
---
4+
15
When performing a code review, pay close attention to code modifying a function's
26
control flow. Could the change result in the corruption of performance profile
37
data? Could the change result in invalid debug information, in particular for

.github/workflows/build-ci-container-tooling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
podman save ${{ steps.vars.outputs.container-name-lint-tag }} > ${{ steps.vars.outputs.container-lint-filename }}
6464
6565
- name: Upload container image
66-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
66+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6767
with:
6868
name: container-amd64
6969
path: "*.tar"

.github/workflows/check-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup Python
2929
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3030
with:
31-
python-version: 3.13
31+
python-version: 3.14
3232
cache: 'pip'
3333
- name: Install Python Dependencies
3434
run: |

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- name: Setup Python env
9898
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
9999
with:
100-
python-version: '3.13'
100+
python-version: '3.14'
101101
cache: 'pip'
102102
cache-dependency-path: 'llvm/docs/requirements-hashed.txt'
103103
- name: Install python dependencies

.github/workflows/gha-codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
sparse-checkout: |
3030
.github/
3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@303c0aef88fc2fe5ff6d63d3b1596bfd83dfa1f9 # v3.30.4
32+
uses: github/codeql-action/init@5d5cd550d3e189c569da8f16ea8de2d821c9bf7a # v3.31.2
3333
with:
3434
languages: actions
3535
queries: security-extended
3636
- name: Perform CodeQL Analysis
37-
uses: github/codeql-action/analyze@303c0aef88fc2fe5ff6d63d3b1596bfd83dfa1f9 # v3.30.4
37+
uses: github/codeql-action/analyze@5d5cd550d3e189c569da8f16ea8de2d821c9bf7a # v3.31.2

0 commit comments

Comments
 (0)