tools/binary_size/libsupersize/demangle.py
def StripLlvmPromotedGlobalNames(name):
  """Strips LLVM promoted global names suffix, and returns the result.

  LLVM can promote global names by adding the suffix '.llvm.1234', or
  '.1.llvm.1234', where the last numeric suffix is a hash. If demangle is
  sucessful, the suffix transforms into, e.g., ' (.llvm.1234)' or
  ' (.1.llvm.1234)'. Otherwise the suffix is left as is. This function strips
  the suffix to prevent it from intefering with name comparison.
  """
  llvm_pos = name.find('.llvm.')
  if llvm_pos < 0:
    return name  # Handles most cases.
  if name.endswith(')'):
    return _PROMOTED_GLOBAL_NAME_DEMANGLED_PATTERN.sub('', name)
  return _PROMOTED_GLOBAL_NAME_RAW_PATTERN.sub('', name)
Strips LLVM promoted global names suffix, and returns the result.

  LLVM can promote global names by adding the suffix '.llvm.1234', or
  '.1.llvm.1234', where the last numeric suffix is a hash. If demangle is
  sucessful, the suffix transforms into, e.g., ' (.llvm.1234)' or
  ' (.1.llvm.1234)'. Otherwise the suffix is left as is. This function strips
  the suffix to prevent it from intefering with name comparison.
  
Strips LLVM promoted global names suffix, and returns the result.
LLVM can promote global names by adding the suffix '.llvm.1234', or
'.1.llvm.1234', where the last numeric suffix is a hash.
Strips LLVM promoted global names suffix and returns the result . LLVM can promote global names by adding the suffix ' . llvm . 1234 ' or ' . 1 . llvm . 1234 ' where the last numeric suffix is a hash .
def StripLlvmPromotedGlobalNames(name):
  llvm_pos = name.find('.llvm.')
  if llvm_pos < 0:
    return name  
  if name.endswith(')'):
    return _PROMOTED_GLOBAL_NAME_DEMANGLED_PATTERN.sub('', name)
  return _PROMOTED_GLOBAL_NAME_RAW_PATTERN.sub('', name)
def StripLlvmPromotedGlobalNames ( name ) : llvm_pos = name . find ( '.llvm.' ) if llvm_pos < 0 : return name if name . endswith ( ')' ) : return _PROMOTED_GLOBAL_NAME_DEMANGLED_PATTERN . sub ( '' , name ) return _PROMOTED_GLOBAL_NAME_RAW_PATTERN . sub ( '' , name )
Strips LLVM promoted global names suffix, and returns the result.
Strips LLVM promoted global names suffix and returns the result .
"""Strips LLVM promoted global names suffix, and returns the result.

  LLVM can promote global names by adding the suffix '.llvm.1234', or
  '.1.llvm.1234', where the last numeric suffix is a hash. If demangle is
  sucessful, the suffix transforms into, e.g., ' (.llvm.1234)' or
  ' (.1.llvm.1234)'. Otherwise the suffix is left as is. This function strips
  the suffix to prevent it from intefering with name comparison.
  """ # Handles most cases.
name