Mercurial > projects > ldc
comparison gen/metadata.h @ 1291:875afb7a93b6
Factor out some constants into the header so producers and consumers of
metadata stay in sync (and are more readable).
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sat, 02 May 2009 20:42:58 +0200 |
parents | 5851c18e4c6d |
children | 8c65217be813 |
comparison
equal
deleted
inserted
replaced
1290:c86a629f24dd | 1291:875afb7a93b6 |
---|---|
2 #define LDC_GEN_METADATA_H | 2 #define LDC_GEN_METADATA_H |
3 | 3 |
4 #include "gen/llvm-version.h" | 4 #include "gen/llvm-version.h" |
5 | 5 |
6 #if LLVM_REV >= 68420 | 6 #if LLVM_REV >= 68420 |
7 # define USE_METADATA | 7 // Yay, we have metadata! |
8 # define METADATA_LINKAGE_TYPE llvm::GlobalValue::WeakODRLinkage | 8 |
9 #define USE_METADATA | |
10 #define METADATA_LINKAGE_TYPE llvm::GlobalValue::WeakODRLinkage | |
11 | |
12 // *** Metadata for TypeInfo instances *** | |
13 #define TD_PREFIX "llvm.ldc.typeinfo." | |
14 | |
15 /// The fields in the metadata node for a TypeInfo instance. | |
16 /// (Its name will be TD_PREFIX ~ <Name of TypeInfo global>) | |
17 enum TypeDataFields { | |
18 TD_Confirm, /// The TypeInfo this node is for | |
19 TD_Type, /// A value of the LLVM type corresponding to this D type | |
20 | |
21 // Must be kept last: | |
22 TD_NumFields /// The number of fields in TypeInfo metadata | |
23 }; | |
24 | |
9 #endif | 25 #endif |
10 | 26 |
11 #endif | 27 #endif |