MCPcopy Create free account
hub / github.com/bshoshany/thread-pool / parse_llvm_version

Function parse_llvm_version

scripts/compile_cpp.py:183–188  ·  view source on GitHub ↗

Extract the LLVM version from a path and returns it as a tuple of integers.

(path_str: str)

Source from the content-addressed store, hash-verified

181
182
183def 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
191def get_llvm_std_module(search: str) -> str | None:

Callers 1

get_llvm_std_moduleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected