GCC Middle and Back End API Reference
file-find.cc File Reference
#include "config.h"
#include "system.h"
#include "filenames.h"
#include "file-find.h"
Include dependency graph for file-find.cc:

Functions

void find_file_set_debug (bool debug_state)
 
charfind_a_file (struct path_prefix *pprefix, const char *name, int mode)
 
void do_add_prefix (struct path_prefix *pprefix, const char *prefix, bool first)
 
void add_prefix (struct path_prefix *pprefix, const char *prefix)
 
void add_prefix_begin (struct path_prefix *pprefix, const char *prefix)
 
void prefix_from_env (const char *env, struct path_prefix *pprefix)
 
void prefix_from_string (const char *p, struct path_prefix *pprefix)
 

Variables

static bool debug = false
 

Function Documentation

◆ add_prefix()

void add_prefix ( struct path_prefix * pprefix,
const char * prefix )
Add an entry for PREFIX at the end of prefix list PREFIX.   

References do_add_prefix(), ggc_alloc(), and prefix_list::prefix.

Referenced by main(), prefix_from_string(), and driver::set_up_specs().

◆ add_prefix_begin()

void add_prefix_begin ( struct path_prefix * pprefix,
const char * prefix )
Add an entry for PREFIX at the begin of prefix list PREFIX.   

References do_add_prefix(), ggc_alloc(), and prefix_list::prefix.

Referenced by main().

◆ do_add_prefix()

void do_add_prefix ( struct path_prefix * pprefix,
const char * prefix,
bool first )
Add an entry for PREFIX to prefix list PREFIX.
Add at beginning if FIRST is true.   

References ggc_alloc(), and prefix_list::prefix.

Referenced by add_prefix(), and add_prefix_begin().

◆ find_a_file()

char * find_a_file ( struct path_prefix * pprefix,
const char * name,
int mode )

◆ find_file_set_debug()

void find_file_set_debug ( bool debug_state)

References debug, and ggc_alloc().

Referenced by main().

◆ prefix_from_env()

void prefix_from_env ( const char * env,
struct path_prefix * pprefix )
Take the value of the environment variable ENV, break it into a path, and
add of the entries to PPREFIX.   

References env, ggc_alloc(), and prefix_from_string().

Referenced by main(), and setup_prefixes().

◆ prefix_from_string()

void prefix_from_string ( const char * p,
struct path_prefix * pprefix )

Variable Documentation

◆ debug

bool debug = false
static
Utility functions for finding files relative to GCC binaries.
   Copyright (C) 1992-2024 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   

Referenced by find_a_file(), find_file_set_debug(), and prefix_from_string().