20#ifndef GCC_DIAGNOSTICS_FILE_CACHE_H
21#define GCC_DIAGNOSTICS_FILE_CACHE_H
87 void dump (FILE *out,
int indent)
const;
100 bool should_skip_bom);
110 void tune (
size_t num_file_slots,
size_t lines);
Definition buffering.h:59
Definition file-cache.h:29
char operator[](int idx) const
Definition file-cache.h:42
const char * get_buffer() const
Definition file-cache.h:40
size_t m_n_elts
Definition file-cache.h:65
char_span(const char *ptr, size_t n_elts)
Definition file-cache.h:31
const char * m_ptr
Definition file-cache.h:64
char * xstrdup() const
Definition file-cache.h:58
size_t length() const
Definition file-cache.h:38
char_span subspan(int offset, int n_elts) const
Definition file-cache.h:49
Definition file-cache.cc:51
void initialize_input_context(diagnostic_input_charset_callback ccb, bool should_skip_bom)
Definition file-cache.cc:41
~file_cache()
Definition file-cache.cc:467
void add_buffered_content(const char *file_path, const char *buffer, size_t sz)
Definition file-cache.cc:274
file_cache_slot * lookup_or_add_file(const char *file_path)
Definition file-cache.cc:498
char_span get_source_line(const char *file_path, int line)
Definition file-cache.cc:932
file_cache_slot * evicted_cache_tab_entry(unsigned *highest_use_count)
Definition file-cache.cc:317
file_cache_slot * m_file_slots
Definition file-cache.h:119
size_t m_num_file_slots
Definition file-cache.h:118
void tune(size_t num_file_slots, size_t lines)
Definition file-cache.cc:202
void forcibly_evict_file(const char *file_path)
Definition file-cache.cc:248
char_span get_source_file_content(const char *file_path)
Definition file-cache.cc:955
input_context m_input_context
Definition file-cache.h:120
bool missing_trailing_newline_p(const char *file_path)
Definition file-cache.cc:265
file_cache_slot * lookup_file(const char *file_path)
Definition file-cache.cc:221
file_cache()
Definition file-cache.cc:459
file_cache_slot * add_file(const char *file_path)
Definition file-cache.cc:357
void DEBUG_FUNCTION dump() const
Definition file-cache.cc:484
const char *(* diagnostic_input_charset_callback)(const char *)
Definition coretypes.h:173
Definition coretypes.h:167
Definition file-cache.h:95
diagnostic_input_charset_callback ccb
Definition file-cache.h:96
bool should_skip_bom
Definition file-cache.h:97
#define gcc_assert(EXPR)
Definition system.h:814
#define bool
Definition system.h:886
#define DEBUG_FUNCTION
Definition system.h:1236