MCPcopy Create free account
hub / github.com/Samsung/UTopia / make_build_db

Method make_build_db

helper/buildparser.py:152–168  ·  view source on GitHub ↗
(
        self,
        name: str,
        src_path: Path,
        bc_file_path: Path,
        ast_paths: List[Path],
    )

Source from the content-addressed store, hash-verified

150 return CMD(command, path)
151
152 def make_build_db(
153 self,
154 name: str,
155 src_path: Path,
156 bc_file_path: Path,
157 ast_paths: List[Path],
158 ):
159 data = {
160 "bc": str(bc_file_path),
161 "ast": [str(ast_path) for ast_path in ast_paths],
162 "project_dir": str(src_path),
163 }
164
165 self.build_db_dir.mkdir(parents=True, exist_ok=True)
166 build_db_path = self.build_db_dir / f"{name}.json"
167 with open(build_db_path, "w") as f:
168 json.dump(data, f)
169
170 def normalize_command(self, cmd: str) -> str:
171 cmd_pattern = re.compile(r"(ar|llvm-ar|llvm-ar-10|clang|clang\+\+) ")

Callers 1

build_ast_irFunction · 0.95

Calls 1

dumpMethod · 0.45

Tested by

no test coverage detected