32#define UNKNOWN_LOCATION ((location_t) 0)
35#define BUILTINS_LOCATION ((location_t) 1)
64#define location_hash int_hash<location_t, UNKNOWN_LOCATION, BUILTINS_LOCATION>
69class cpp_char_column_policy;
73 expanded_location exploc,
74 const cpp_char_column_policy &policy);
141 void dump (FILE *out,
int indent)
const;
154 bool should_skip_bom);
164 static void tune(
size_t num_file_slots_,
size_t lines);
177extern expanded_location
179 enum location_aspect aspect
180 = LOCATION_ASPECT_CARET);
190#define LOCATION_FILE(LOC) ((expand_location (LOC)).file)
191#define LOCATION_LINE(LOC) ((expand_location (LOC)).line)
192#define LOCATION_COLUMN(LOC)((expand_location (LOC)).column)
193#define LOCATION_LOCUS(LOC) \
194 ((IS_ADHOC_LOC (LOC)) ? get_location_from_adhoc_loc (line_table, LOC) \
196#define LOCATION_BLOCK(LOC) \
197 ((tree) ((IS_ADHOC_LOC (LOC)) ? get_data_from_adhoc_loc (line_table, (LOC)) \
199#define RESERVED_LOCATION_P(LOC) \
200 (LOCATION_LOCUS (LOC) < RESERVED_LOCATION_COUNT)
215 return linemap_location_in_system_header_p (
line_table, loc);
224 return linemap_location_from_macro_expansion_p (
line_table, loc);
234 return linemap_location_from_macro_definition_p (
line_table, loc);
248 return get_range_from_loc (
line_table, loc).m_start;
256 return get_range_from_loc (
line_table, loc).m_finish;
260 location_t start, location_t finish);
261extern location_t
make_location (location_t caret, source_range src_range);
284 location_t **out_locs);
292 friend void ::gt_ggc_mx_string_concat_db (
void *x_p);
293 friend void ::gt_pch_nx_string_concat_db (
void *x_p);
294 friend void ::gt_pch_p_16string_concat_db (
void *this_obj,
void *x_p,
298 hash_map <location_hash, string_concat *> *
m_table;
size_t m_n_elts
Definition input.h:116
const char * get_buffer() const
Definition input.h:91
char_span subspan(int offset, int n_elts) const
Definition input.h:100
char_span(const char *ptr, size_t n_elts)
Definition input.h:82
size_t length() const
Definition input.h:89
char * xstrdup() const
Definition input.h:109
char operator[](int idx) const
Definition input.h:93
const char * m_ptr
Definition input.h:115
file_cache_slot * lookup_or_add_file(const char *file_path)
Definition input.cc:599
static void tune(size_t num_file_slots_, size_t lines)
Definition input.cc:205
file_cache_slot * add_file(const char *file_path)
Definition input.cc:459
~file_cache()
Definition input.cc:569
file_cache_slot * lookup_file(const char *file_path)
Definition input.cc:324
input_context m_input_context
Definition input.h:174
void DEBUG_FUNCTION dump() const
Definition input.cc:585
bool missing_trailing_newline_p(const char *file_path)
Definition input.cc:368
file_cache_slot * evicted_cache_tab_entry(unsigned *highest_use_count)
Definition input.cc:419
file_cache_slot * m_file_slots
Definition input.h:173
char_span get_source_line(const char *file_path, int line)
Definition input.cc:1018
void add_buffered_content(const char *file_path, const char *buffer, size_t sz)
Definition input.cc:377
file_cache()
Definition input.cc:561
char_span get_source_file_content(const char *file_path)
Definition input.cc:1134
void initialize_input_context(diagnostic_input_charset_callback ccb, bool should_skip_bom)
Definition input.cc:45
static size_t num_file_slots
Definition input.h:172
void forcibly_evict_file(const char *file_path)
Definition input.cc:351
void record_string_concatenation(int num, location_t *locs)
Definition input.cc:1654
string_concat_db()
Definition input.cc:1644
bool get_string_concatenation(location_t loc, int *out_num, location_t **out_locs)
Definition input.cc:1680
static location_t get_key_loc(location_t loc)
Definition input.cc:1708
hash_map< location_hash, string_concat * > * m_table
Definition input.h:298
string_concat(int num, location_t *locs)
Definition input.cc:1634
int m_num
Definition input.h:272
location_t * m_locs
Definition input.h:273
const char *(* diagnostic_input_charset_callback)(const char *)
Definition coretypes.h:171
#define GTY(x)
Definition coretypes.h:41
void(* gt_pointer_operator)(void *, void *, void *)
Definition coretypes.h:473
static class line_maps * line_table
Definition genmatch.cc:55
diagnostic_input_charset_callback ccb
Definition input.h:150
bool should_skip_bom
Definition input.h:151
#define gcc_assert(EXPR)
Definition system.h:814
#define bool
Definition system.h:886
#define DEBUG_FUNCTION
Definition system.h:1236