Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/vxlink-bind.ads @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 ------------------------------------------------------------------------------ | |
2 -- -- | |
3 -- GNAT COMPILER COMPONENTS -- | |
4 -- -- | |
5 -- V X L I N K . B I N D -- | |
6 -- -- | |
7 -- S p e c -- | |
8 -- -- | |
9 -- Copyright (C) 2018, AdaCore -- | |
10 -- -- | |
11 -- GNAT is free software; you can redistribute it and/or modify it under -- | |
12 -- terms of the GNU General Public License as published by the Free Soft- -- | |
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- | |
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- | |
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- | |
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- | |
17 -- for more details. You should have received a copy of the GNU General -- | |
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to -- | |
19 -- http://www.gnu.org/licenses for a complete copy of the license. -- | |
20 -- -- | |
21 -- GNAT was originally developed by the GNAT team at New York University. -- | |
22 -- Extensive contributions were provided by Ada Core Technologies Inc. -- | |
23 -- -- | |
24 ------------------------------------------------------------------------------ | |
25 | |
26 pragma Ada_2012; | |
27 | |
28 private with Ada.Containers.Ordered_Sets; | |
29 private with Ada.Strings.Unbounded; | |
30 | |
31 package VxLink.Bind is | |
32 | |
33 type VxLink_Binder is private; | |
34 | |
35 procedure Initialize | |
36 (Binder : out VxLink_Binder; | |
37 Object_File : String); | |
38 | |
39 procedure Parse_Tag_File | |
40 (Binder : in out VxLink_Binder; | |
41 File : String); | |
42 | |
43 procedure Emit_CTDT | |
44 (Binder : in out VxLink_Binder; | |
45 Namespace : String); | |
46 | |
47 function CTDT_File (Binder : VxLink_Binder) return String; | |
48 | |
49 private | |
50 | |
51 use Ada.Strings.Unbounded; | |
52 | |
53 type Symbol_Kind is (Sym_Ctor, Sym_Dtor, Sym_Other); | |
54 | |
55 type Symbol is record | |
56 Name : Unbounded_String; | |
57 Cat : Character; | |
58 Internal : Boolean; | |
59 Kind : Symbol_Kind; | |
60 Priority : Integer; | |
61 end record; | |
62 | |
63 function "=" (S1, S2 : Symbol) return Boolean | |
64 is (S1.Name = S2.Name and then S1.Cat = S2.Cat); | |
65 | |
66 function "<" (S1, S2 : Symbol) return Boolean | |
67 is (if S1.Priority /= S2.Priority | |
68 then S1.Priority < S2.Priority | |
69 elsif S1.Name /= S2.Name | |
70 then S1.Name < S2.Name | |
71 else S1.Cat < S2.Cat); | |
72 | |
73 package Symbol_Sets is new Ada.Containers.Ordered_Sets | |
74 (Symbol, | |
75 "<" => "<", | |
76 "=" => "="); | |
77 | |
78 type VxLink_Binder is record | |
79 CTDT_File : Unbounded_String; | |
80 Constructors : Symbol_Sets.Set; | |
81 Destructors : Symbol_Sets.Set; | |
82 Module_Dtor_Needed : Boolean; | |
83 EH_Frame_Needed : Boolean; | |
84 Tags_List : Strings_List.Vector; | |
85 end record; | |
86 | |
87 end VxLink.Bind; |