MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / llvm_nm

Function llvm_nm

test/test_other.py:289–311  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

287
288
289def 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
314class other(RunnerCore):

Calls 4

run_processMethod · 0.80
upperMethod · 0.80
setFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected