Extract the LLVM version from a path and returns it as a tuple of integers.
(path_str: str)
| 181 | |
| 182 | |
| 183 | def parse_llvm_version(path_str: str) -> tuple[int, ...] | None: |
| 184 | """Extract the LLVM version from a path and returns it as a tuple of integers.""" |
| 185 | match: re.Match[str] | None = re.search(r"/llvm[-/](\d+(?:\.\d+)*)", path_str) |
| 186 | if match is None: |
| 187 | return None |
| 188 | return tuple(int(part) for part in match.group(1).split(".")) |
| 189 | |
| 190 | |
| 191 | def get_llvm_std_module(search: str) -> str | None: |
no outgoing calls
no test coverage detected