• Home
  • Raw
  • Download

Lines Matching +full:use +full:- +full:external +full:- +full:names

27 # different tools. We use subprocess.Popen and yield a symbol at a time instead
38 # Look for external symbols that are defined in some section
39 match = re.match("^.+SECT.+External\s+\|\s+(\S+).*$", line)
50 # Look for external symbols that are defined in some section
57 process = subprocess.Popen(['llvm-readobj','-symbols',lib], bufsize=1,
62 # When looking through the output of llvm-readobj we expect to see Name,
64 # them and decide if this is a defined external symbol when we see
77 storageclass == 'External':
81 # Define functions which determine if the target is 32-bit Windows (as that's
102 output = subprocess.check_output(['objdump','-f',lib],
107 return (match.group(1) == 'pe-i386')
111 output = subprocess.check_output(['llvm-readobj','-file-headers',lib],
116 return (match.group(1) == 'COFF-i386')
119 # MSVC mangles names to ?<identifier_mangling>@<type_mangling>. By examining the
123 # Keep unmangled (i.e. extern "C") names
126 # Remove calling convention decoration from names
154 # function type mangling. To spot a function type we use (this is derived
156 # <function-type> ::= <function-class> <this-cvr-qualifiers>
157 # <calling-convention> <return-type>
158 # <argument-list> <throw-spec>
159 # <function-class> ::= [A-Z]
160 # <this-cvr-qualifiers> ::= [A-Z0-9_]*
161 # <calling-convention> ::= [A-JQ]
162 # <return-type> ::= .+
163 # <argument-list> ::= X (void)
166 # <throw-spec> ::= exceptions are not allowed
167 elif re.search('(llvm|clang)@@[A-Z][A-Z0-9_]*[A-JQ].+(X|.+@|.*Z)$', symbol):
179 # Keep unmangled names
182 # Discard manglings that aren't nested names
189 names, _ = parse_itanium_nested_name(match.group(2))
192 if not names:
196 if re.match('[CD][123]', names[-1][0]) and names[-2][1]:
200 elif names[-1][1]:
202 # Keep llvm:: and clang:: names
203 elif names[0][0] == '4llvm' or names[0][0] == '5clang':
224 # Check for constructor/destructor names
243 # Check for names
250 match = re.match('S[A-Z0-9]*_(.+)', tmp)
278 match = re.match('NS[A-Z0-9]*_(.+)', arg)
284 # Skip past CV-qualifiers and ref qualifiers
289 # Repeatedly parse names from the string until we reach the end of the
322 tool_exes = ['dumpbin','nm','objdump','llvm-readobj']
325 parser.add_argument('--mangling', choices=['itanium','microsoft'],
327 parser.add_argument('--tools', choices=tool_exes, nargs='*',
328 help='tools to use to extract symbols and determine the'
332 parser.add_argument('-o', metavar='file', type=str, help='output to file')
335 # Determine the function to use to get the list of symbols from the inputs,
336 # and the function to use to determine if the target is 32-bit windows.
340 'llvm-readobj' : (readobj_get_symbols, readobj_is_32bit_windows) }
343 # If we have a tools argument then use that for the list of tools to check
346 # Find a tool to use by trying each in turn until we find one that exists
361 # Keep going until we have a tool to use for both get_symbols and
388 # When invoked by cmake the arguments are the cmake target names of the
415 # use a lambda or local function definition as that doesn't work on
426 # On Ctrl-C terminate everything and exit
464 # checking if the second-to-last name in the list is a template.
468 names, _ = parse_itanium_nested_name(match.group(2)) variable
469 if names and names[-2][1]:
470 name = ''.join([x for x,_ in names])
474 # just leave it as-is.