Merge "Update check_elf_file.py for clang-r353983"
am: 81589605fd
Change-Id: I0bdb631d5eeae4fd834efa5255ae472d76763935
This commit is contained in:
commit
5d00745b0a
1 changed files with 12 additions and 5 deletions
|
@ -260,13 +260,20 @@ class ELFParser(object):
|
||||||
_SYMBOL_ENTRY_END_PATTERN = ' }'
|
_SYMBOL_ENTRY_END_PATTERN = ' }'
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
def _parse_symbol_name(cls, name_with_version):
|
def _parse_symbol_name(name_with_version):
|
||||||
"""Split `name_with_version` into name and version. This function may split
|
"""Split `name_with_version` into name and version. This function may split
|
||||||
at last occurrence of `@@` or `@`."""
|
at last occurrence of `@@` or `@`."""
|
||||||
name, version = name_with_version.rsplit('@', 1)
|
pos = name_with_version.rfind('@')
|
||||||
if name and name[-1] == '@':
|
if pos == -1:
|
||||||
name = name[:-1]
|
name = name_with_version
|
||||||
|
version = ''
|
||||||
|
else:
|
||||||
|
if pos > 0 and name_with_version[pos - 1] == '@':
|
||||||
|
name = name_with_version[0:pos - 1]
|
||||||
|
else:
|
||||||
|
name = name_with_version[0:pos]
|
||||||
|
version = name_with_version[pos + 1:]
|
||||||
return (name, version)
|
return (name, version)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue