GCC Middle and Back End API Reference
diagnostic-info.h
Go to the documentation of this file.
1
/* Various declarations for language-independent diagnostics subroutines.
2
Copyright (C) 2000-2025 Free Software Foundation, Inc.
3
4
This file is part of GCC.
5
6
GCC is free software; you can redistribute it and/or modify it under
7
the terms of the GNU General Public License as published by the Free
8
Software Foundation; either version 3, or (at your option) any later
9
version.
10
11
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12
WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with GCC; see the file COPYING3. If not see
18
<http://www.gnu.org/licenses/>. */
19
20
#ifndef GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H
21
#define GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H
22
23
namespace
diagnostics
{
24
25
class
metadata
;
26
27
/* A diagnostic is described by the MESSAGE to send, the FILE and LINE of
28
its context and its KIND (ice, error, warning, note, ...) See complete
29
list in diagnostics/kinds.def. */
30
31
struct
diagnostic_info
32
{
33
diagnostic_info
()
34
:
m_message
(),
35
m_richloc
(),
36
m_metadata
(),
37
m_x_data
(),
38
m_kind
(),
39
m_option_id
(),
40
m_iinfo
()
41
{ }
42
43
/* Text to be formatted. */
44
text_info
m_message
;
45
46
/* The location at which the diagnostic is to be reported. */
47
rich_location *
m_richloc
;
48
49
/* An optional bundle of metadata associated with the diagnostic
50
(or NULL). */
51
const
metadata
*
m_metadata
;
52
53
/* Auxiliary data for client. */
54
void
*
m_x_data
;
55
/* The kind of diagnostic it is about. */
56
kind
m_kind
;
57
/* Which OPT_* directly controls this diagnostic. */
58
option_id
m_option_id
;
59
60
/* Inlining context containing locations for each call site along
61
the inlining stack. */
62
struct
inlining_info
63
{
64
/* Locations along the inlining stack. */
65
auto_vec<location_t, 8>
m_ilocs
;
66
/* The abstract origin of the location. */
67
void
*
m_ao
;
68
/* Set if every M_ILOCS element is in a system header. */
69
bool
m_allsyslocs
;
70
}
m_iinfo
;
71
};
72
73
}
// namespace diagnostics
74
75
#endif
/* ! GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H */
auto_vec
Definition
vec.h:1667
diagnostics::metadata
Definition
metadata.h:41
diagnostics
Definition
coretypes.h:167
diagnostics::kind
kind
Definition
kinds.h:27
diagnostics::diagnostic_info::inlining_info
Definition
diagnostic-info.h:63
diagnostics::diagnostic_info::inlining_info::m_ao
void * m_ao
Definition
diagnostic-info.h:67
diagnostics::diagnostic_info::inlining_info::m_ilocs
auto_vec< location_t, 8 > m_ilocs
Definition
diagnostic-info.h:65
diagnostics::diagnostic_info::inlining_info::m_allsyslocs
bool m_allsyslocs
Definition
diagnostic-info.h:69
diagnostics::diagnostic_info::diagnostic_info
diagnostic_info()
Definition
diagnostic-info.h:33
diagnostics::diagnostic_info::m_metadata
const metadata * m_metadata
Definition
diagnostic-info.h:51
diagnostics::diagnostic_info::m_kind
kind m_kind
Definition
diagnostic-info.h:56
diagnostics::diagnostic_info::m_iinfo
struct diagnostics::diagnostic_info::inlining_info m_iinfo
diagnostics::diagnostic_info::m_richloc
rich_location * m_richloc
Definition
diagnostic-info.h:47
diagnostics::diagnostic_info::m_message
text_info m_message
Definition
diagnostic-info.h:44
diagnostics::diagnostic_info::m_option_id
option_id m_option_id
Definition
diagnostic-info.h:58
diagnostics::diagnostic_info::m_x_data
void * m_x_data
Definition
diagnostic-info.h:54
diagnostics::option_id
Definition
option-id.h:32
text_info
Definition
pretty-print.h:34
gcc
diagnostics
diagnostic-info.h
Generated by
1.14.0