Skip to content

Commit fd8973d

Browse files
nikictbaederr
authored andcommitted
Update Python 3.6 patch
Port the changes from llvm/llvm-project#89490 to Python 3.6.
1 parent f6e24c0 commit fd8973d

File tree

1 file changed

+55
-4
lines changed

1 file changed

+55
-4
lines changed

0001-Add-back-support-for-Python-3.6.patch

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,64 @@
1-
From fea6f0e31253ad0f335eea2e4718bacd5930d6d4 Mon Sep 17 00:00:00 2001
1+
From 74f3d3579ef636a20d7832b39bf1355c0f734848 Mon Sep 17 00:00:00 2001
22
From: Nikita Popov <[email protected]>
33
Date: Fri, 19 Jul 2024 14:52:49 +0200
44
Subject: [PATCH] Add back support for Python 3.6
55

66
---
7-
llvm/CMakeLists.txt | 2 +-
8-
llvm/utils/update_test_body.py | 6 ++++--
9-
2 files changed, 5 insertions(+), 3 deletions(-)
7+
.../clang-tidy/tool/run-clang-tidy.py | 21 ++++++++++++++++---
8+
llvm/CMakeLists.txt | 2 +-
9+
llvm/utils/update_test_body.py | 6 ++++--
10+
3 files changed, 23 insertions(+), 6 deletions(-)
1011

12+
diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
13+
index 48401ba5ea42..c6552db36587 100755
14+
--- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
15+
+++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
16+
@@ -36,7 +36,6 @@ http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html
17+
18+
import argparse
19+
import asyncio
20+
-from dataclasses import dataclass
21+
import glob
22+
import json
23+
import multiprocessing
24+
@@ -223,7 +222,6 @@ async def run_with_semaphore(
25+
return await f(*args, **kwargs)
26+
27+
28+
-@dataclass
29+
class ClangTidyResult:
30+
filename: str
31+
invocation: List[str]
32+
@@ -232,6 +230,22 @@ class ClangTidyResult:
33+
stderr: str
34+
elapsed: float
35+
36+
+ def __init(
37+
+ self,
38+
+ filename: str,
39+
+ invocation: List[str],
40+
+ returncode: int,
41+
+ stdout: str,
42+
+ stderr: str,
43+
+ elapsed: float,
44+
+ ):
45+
+ self.filename = filename
46+
+ self.invocation = invocation
47+
+ self.returncode = returncode
48+
+ self.stdout = stdout
49+
+ self.stderr = stderr
50+
+ self.elapsed = elapsed
51+
+
52+
53+
async def run_tidy(
54+
args: argparse.Namespace,
55+
@@ -623,4 +637,5 @@ async def main() -> None:
56+
57+
58+
if __name__ == "__main__":
59+
- asyncio.run(main())
60+
+ loop = asyncio.new_event_loop()
61+
+ loop.run_until_complete(main())
1162
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
1263
index 12618966c4ad..9c4df0082a9a 100644
1364
--- a/llvm/CMakeLists.txt

0 commit comments

Comments
 (0)