tools/clang/pylib/clang/compile_db.py
def _ProcessEntry(entry, filtered_args, target_os):
  """Transforms one entry in a compile db to be more clang-tool friendly.

  Expands the contents of the response file, if any, and performs any
  transformations needed to make the compile DB easier to use for third-party
  tooling.
  """
  # Expand the contents of the response file, if any.
  # http://llvm.org/bugs/show_bug.cgi?id=21634
  try:
    match = _RSP_RE.search(entry['command'])
    if match:
      rsp_path = os.path.join(entry['directory'], match.group(2))
      rsp_contents = open(rsp_path).read()
      entry['command'] = ''.join([
          entry['command'][:match.start(1)], rsp_contents,
          entry['command'][match.end(1):]
      ])
  except IOError:
    if _debugging:
      print('Couldn\'t read response file for %s' % entry['file'])

  entry['command'] = _ProcessCommand(entry['command'], filtered_args, target_os)

  return entry
Transforms one entry in a compile db to be more clang-tool friendly.

  Expands the contents of the response file, if any, and performs any
  transformations needed to make the compile DB easier to use for third-party
  tooling.
  
Transforms one entry in a compile db to be more clang-tool friendly.
Expands the contents of the response file, if any, and performs any
transformations needed to make the compile DB easier to use for third-party
tooling.
Transforms one entry in a compile db to be more clang - tool friendly . Expands the contents of the response file if any and performs any transformations needed to make the compile DB easier to use for third - party tooling .
def _ProcessEntry(entry, filtered_args, target_os):
  try:
    match = _RSP_RE.search(entry['command'])
    if match:
      rsp_path = os.path.join(entry['directory'], match.group(2))
      rsp_contents = open(rsp_path).read()
      entry['command'] = ''.join([
          entry['command'][:match.start(1)], rsp_contents,
          entry['command'][match.end(1):]
      ])
  except IOError:
    if _debugging:
      print('Couldn\'t read response file for %s' % entry['file'])
  entry['command'] = _ProcessCommand(entry['command'], filtered_args, target_os)
  return entry
def _ProcessEntry ( entry , filtered_args , target_os ) : try : match = _RSP_RE . search ( entry [ 'command' ] ) if match : rsp_path = os . path . join ( entry [ 'directory' ] , match . group ( 2 ) ) rsp_contents = open ( rsp_path ) . read ( ) entry [ 'command' ] = '' . join ( [ entry [ 'command' ] [ : match . start ( 1 ) ] , rsp_contents , entry [ 'command' ] [ match . end ( 1 ) : ] ] ) except IOError : if _debugging : print ( 'Couldn\'t read response file for %s' % entry [ 'file' ] ) entry [ 'command' ] = _ProcessCommand ( entry [ 'command' ] , filtered_args , target_os ) return entry
Transforms one entry in a compile db to be more clang-tool friendly.
Transforms one entry in a compile db to be more clang - tool friendly .
"""Transforms one entry in a compile db to be more clang-tool friendly.

  Expands the contents of the response file, if any, and performs any
  transformations needed to make the compile DB easier to use for third-party
  tooling.
  """ # Expand the contents of the response file, if any. # http://llvm.org/bugs/show_bug.cgi?id=21634
entry
filtered_args
target_os