(file)
| 287 | |
| 288 | |
| 289 | def llvm_nm(file): |
| 290 | output = utils.run_process([LLVM_NM, file], stdout=PIPE).stdout |
| 291 | |
| 292 | symbols = { |
| 293 | 'defs': set(), |
| 294 | 'undefs': set(), |
| 295 | 'commons': set(), |
| 296 | } |
| 297 | |
| 298 | for line in output.splitlines(): |
| 299 | # Skip address, which is always fixed-length 8 chars (plus 2 |
| 300 | # leading chars `: ` and one trailing space) |
| 301 | status = line[9] |
| 302 | symbol = line[11:] |
| 303 | |
| 304 | if status == 'U': |
| 305 | symbols['undefs'].add(symbol) |
| 306 | elif status == 'C': |
| 307 | symbols['commons'].add(symbol) |
| 308 | elif status == status.upper(): |
| 309 | symbols['defs'].add(symbol) |
| 310 | |
| 311 | return symbols |
| 312 | |
| 313 | |
| 314 | class other(RunnerCore): |
no test coverage detected