parameters: (self, name, search_env=None, required=False, quiet=False)
return_statement: return tool
docstring: Find the executable program 'name', optionally using the specified
          environment variable as an override before searching the
          configuration's PATH.
docstring_summary: Find the executable program 'name', optionally using the specified
          environment variable as an override before searching the
          configuration's PATH.
docstring_tokens: Find the executable program name optionally using the specified environment variable as an override before searching the configuration s PATH .
function: def use_llvm_tool(self, name, search_env=None, required=False, quiet=False):
          """Find the executable program 'name', optionally using the specified
          environment variable as an override before searching the
          configuration's PATH."""
          # If the override is specified in the environment, use it without
          # validation.
          if search_env:
              tool = self.config.environment.get(search_env)
              if tool:
                  return tool
  
          # Otherwise look in the path.
          tool = lit.util.which(name, self.config.environment['PATH'])
  
          if required and not tool:
              message = "couldn't find '{}' program".format(name)
              if search_env:
                  message = message + \
                      ', try setting {} in your environment'.format(search_env)
              self.lit_config.fatal(message)
  
          if tool:
              tool = os.path.normpath(tool)
              if not self.lit_config.quiet and not quiet:
                  self.lit_config.note('using {}: {}'.format(name, tool))
          return tool
function_tokens: def use_llvm_tool ( self , name , search_env = None , required = False , quiet = False ) : # If the override is specified in the environment, use it without # validation. if search_env : tool = self . config . environment . get ( search_env ) if tool : return tool # Otherwise look in the path. tool = lit . util . which ( name , self . config . environment [ 'PATH' ] ) if required and not tool : message = "couldn't find '{}' program" . format ( name ) if search_env : message = message + ', try setting {} in your environment' . format ( search_env ) self . lit_config . fatal ( message ) if tool : tool = os . path . normpath ( tool ) if not self . lit_config . quiet and not quiet : self . lit_config . note ( 'using {}: {}' . format ( name , tool ) ) return tool