parameters: (output, underscore, libs, nm)
docstring: Generate the export file for the LLVM-C DLL.
  
      Run `nm` for each lib in `libs`, and output an export file
      to `output`. If `underscore` is true, symbols will
      be assumed to be prefixed with an underscore.
docstring_summary: Generate the export file for the LLVM-C DLL.
docstring_tokens: Generate the export file for the LLVM - C DLL .
function: def gen_llvm_c_export(output, underscore, libs, nm):
      """Generate the export file for the LLVM-C DLL.
  
      Run `nm` for each lib in `libs`, and output an export file
      to `output`. If `underscore` is true, symbols will
      be assumed to be prefixed with an underscore.
      """
      with removing(touch_tempfile(prefix='dumpout', suffix='.txt')) as dumpout:
  
          # Get the right regex.
          p = _UNDERSCORE_REGEX[underscore]
  
          with open(output, 'w+t') as output_f:
  
              # For each lib get the LLVM* functions it exports.
              for lib in libs:
                  # Call dumpbin.
                  with open(dumpout, 'w+t') as dumpout_f:
                      check_call([nm, '-g', lib], stdout=dumpout_f)
  
                  # Get the matching lines.
                  with open(dumpout) as dumpbin:
                      for line in dumpbin:
                          m = p.match(line)
                          if m is not None:
                              output_f.write(m.group(1) + '\n')
function_tokens: def gen_llvm_c_export ( output , underscore , libs , nm ) : with removing ( touch_tempfile ( prefix = 'dumpout' , suffix = '.txt' ) ) as dumpout : # Get the right regex. p = _UNDERSCORE_REGEX [ underscore ] with open ( output , 'w+t' ) as output_f : # For each lib get the LLVM* functions it exports. for lib in libs : # Call dumpbin. with open ( dumpout , 'w+t' ) as dumpout_f : check_call ( [ nm , '-g' , lib ] , stdout = dumpout_f ) # Get the matching lines. with open ( dumpout ) as dumpbin : for line in dumpbin : m = p . match ( line ) if m is not None : output_f . write ( m . group ( 1 ) + '\n' )