tools/binary_size/libsupersize/demangle.py
def _DemangleNames(names, tool_prefix):
  """Uses c++filt to demangle a list of names."""
  # pylint: disable=unexpected-keyword-arg
  proc = subprocess.Popen([path_util.GetCppFiltPath(tool_prefix)],
                          stdin=subprocess.PIPE,
                          stdout=subprocess.PIPE,
                          encoding='utf-8')
  in_data = '\n'.join(_ExtractDemanglablePart(names))
  stdout = proc.communicate(in_data)[0]
  assert proc.returncode == 0
  ret = [
      _PostProcessDemangledSymbol(old_name, new_name)
      for (old_name, new_name) in zip(names, stdout.splitlines())
  ]
  if logging.getLogger().isEnabledFor(logging.INFO):
    fail_count = sum(1 for s in ret if _CanDemangle(s))
    if fail_count:
      logging.info('* Failed to demangle %d/%d items', fail_count, len(ret))
  return ret
Uses c++filt to demangle a list of names.
Uses c++filt to demangle a list of names.
Uses c ++ filt to demangle a list of names .
def _DemangleNames(names, tool_prefix):
  proc = subprocess.Popen([path_util.GetCppFiltPath(tool_prefix)],
                          stdin=subprocess.PIPE,
                          stdout=subprocess.PIPE,
                          encoding='utf-8')
  in_data = '\n'.join(_ExtractDemanglablePart(names))
  stdout = proc.communicate(in_data)[0]
  assert proc.returncode == 0
  ret = [
      _PostProcessDemangledSymbol(old_name, new_name)
      for (old_name, new_name) in zip(names, stdout.splitlines())
  ]
  if logging.getLogger().isEnabledFor(logging.INFO):
    fail_count = sum(1 for s in ret if _CanDemangle(s))
    if fail_count:
      logging.info('* Failed to demangle %d/%d items', fail_count, len(ret))
  return ret
def _DemangleNames ( names , tool_prefix ) : proc = subprocess . Popen ( [ path_util . GetCppFiltPath ( tool_prefix ) ] , stdin = subprocess . PIPE , stdout = subprocess . PIPE , encoding = 'utf-8' ) in_data = '\n' . join ( _ExtractDemanglablePart ( names ) ) stdout = proc . communicate ( in_data ) [ 0 ] assert proc . returncode == 0 ret = [ _PostProcessDemangledSymbol ( old_name , new_name ) for ( old_name , new_name ) in zip ( names , stdout . splitlines ( ) ) ] if logging . getLogger ( ) . isEnabledFor ( logging . INFO ) : fail_count = sum ( 1 for s in ret if _CanDemangle ( s ) ) if fail_count : logging . info ( '* Failed to demangle %d/%d items' , fail_count , len ( ret ) ) return ret
Uses c++filt to demangle a list of names.
Uses c ++ filt to demangle a list of names .
"""Uses c++filt to demangle a list of names.""" # pylint: disable=unexpected-keyword-arg
names
tool_prefix