Debian Codegraph @

gcc/m2/gm2-compiler/M2LangDump.def

raw
1 (* M2LangDump.def provides support routines for the -flang-dump.
2
3 Copyright (C) 2024-2025 Free Software Foundation, Inc.
4 Contributed by Gaius Mulley <[email protected]>.
5
6 This file is part of GNU Modula-2.
7
8 GNU Modula-2 is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
12
13 GNU Modula-2 is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU Modula-2; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. *)
21
22 DEFINITION MODULE M2LangDump ;
23
24 FROM gcctypes IMPORT tree ;
25 FROM DynamicStrings IMPORT String ;
26 FROM FIO IMPORT File ;
27
28
29 (*
30 IsDumpRequiredTree - return TRUE if the gcc tree should be dumped.
31 If no filter is specified it will always return default.
32 *)
33
34 PROCEDURE IsDumpRequiredTree (gcctree: tree; default: BOOLEAN) : BOOLEAN ;
35
36
37 (*
38 IsDumpRequired - return TRUE if symbol sym should be dumped
39 according to the rules of the filter.
40 If no filter is specified it will always return default.
41 The filter is a comma separated list. Each element
42 of the list can specify a symbol three ways.
43 Firstly by DECL name for example: m2pim_NumberIO_HexToStr
44 Secondly by qualified scope: [pathname.]NumberIO.HexToStr
45 Thirdly by filename and scope: NumberIO.mod:HexToStr
46 *)
47
48 PROCEDURE IsDumpRequired (sym: CARDINAL; default: BOOLEAN) : BOOLEAN ;
49
50
51 (*
52 MakeQuadTemplate - return a template for the quad dump file.
53 *)
54
55 PROCEDURE MakeQuadTemplate () : String ;
56
57
58 (*
59 MakeGimpleTemplate - return a template for the gimple dump file and assign
60 len to the max number of characters required to complete
61 a template.
62 *)
63
64 PROCEDURE MakeGimpleTemplate (VAR len: CARDINAL) : String ;
65
66
67 (*
68 GetDumpFile - return the dump output file.
69 *)
70
71 PROCEDURE GetDumpFile () : File ;
72
73
74 (*
75 CreateDumpQuad - create the dump file for a quad dump.
76 *)
77
78 PROCEDURE CreateDumpQuad (title: ARRAY OF CHAR) ;
79
80
81 (*
82 CloseDumpQuad - close the dump output file.
83 *)
84
85 PROCEDURE CloseDumpQuad ;
86
87
88 (*
89 CreateDumpDecl - create the dump file for a decl dump.
90 *)
91
92 PROCEDURE CreateDumpDecl (title: ARRAY OF CHAR) ;
93
94
95 (*
96 CloseDumpDecl - close the dump output file.
97 *)
98
99 PROCEDURE CloseDumpDecl ;
100
101
102 END M2LangDump.