Mercurial > projects > ldc
comparison dmd2/lib.h @ 1452:638d16625da2
LDC 2 compiles again.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sat, 30 May 2009 17:23:32 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1423:42bd767ec5a4 | 1452:638d16625da2 |
---|---|
1 | |
2 // Compiler implementation of the D programming language | |
3 // Copyright (c) 1999-2008 by Digital Mars | |
4 // All Rights Reserved | |
5 // written by Walter Bright | |
6 // http://www.digitalmars.com | |
7 // License for redistribution is by either the Artistic License | |
8 // in artistic.txt, or the GNU General Public License in gnu.txt. | |
9 // See the included readme.txt for details. | |
10 | |
11 #ifndef DMD_LIB_H | |
12 #define DMD_LIB_H | |
13 | |
14 #ifdef __DMC__ | |
15 #pragma once | |
16 #endif /* __DMC__ */ | |
17 | |
18 struct ObjModule; | |
19 | |
20 struct ObjSymbol | |
21 { | |
22 char *name; | |
23 ObjModule *om; | |
24 }; | |
25 | |
26 struct Library | |
27 { | |
28 File *libfile; | |
29 Array objmodules; // ObjModule[] | |
30 Array objsymbols; // ObjSymbol[] | |
31 | |
32 StringTable tab; | |
33 | |
34 Library(); | |
35 void setFilename(char *dir, char *filename); | |
36 void addObject(const char *module_name, void *buf, size_t buflen); | |
37 void addLibrary(void *buf, size_t buflen); | |
38 void write(); | |
39 | |
40 private: | |
41 void addSymbol(ObjModule *om, char *name, int pickAny = 0); | |
42 void scanObjModule(ObjModule *om); | |
43 unsigned short numDictPages(unsigned padding); | |
44 int FillDict(unsigned char *bucketsP, unsigned short uNumPages); | |
45 void WriteLibToBuffer(OutBuffer *libbuf); | |
46 }; | |
47 | |
48 #endif /* DMD_LIB_H */ | |
49 |