annotate gen/rttibuilder.h @ 1382:a0a4d4dac1a4

Renamed !TypeInfoBuilder to !RTTIBuilder.
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Sun, 17 May 2009 15:20:58 +0200
parents a5d0e04298a8
children f15a2d131ceb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1374
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
1 #ifndef __LDC_GEN_RTTIBUILDER_H__
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
2 #define __LDC_GEN_RTTIBUILDER_H__
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
3
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
4 #include "llvm/Constant.h"
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
5 #include "llvm/ADT/SmallVector.h"
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
6
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
7 struct ClassDeclaration;
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
8 struct TypeClass;
1376
a5d0e04298a8 Cleaned up TypeInfo_Tuple generation.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1375
diff changeset
9 struct Type;
1374
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
10
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
11 struct IrStruct;
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
12
1382
a0a4d4dac1a4 Renamed !TypeInfoBuilder to !RTTIBuilder.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1376
diff changeset
13 struct RTTIBuilder
1374
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
14 {
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
15 ClassDeclaration* base;
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
16 TypeClass* basetype;
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
17 IrStruct* baseir;
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
18
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
19 // 10 is enough for any D1 typeinfo
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
20 llvm::SmallVector<llvm::Constant*, 10> inits;
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
21
1382
a0a4d4dac1a4 Renamed !TypeInfoBuilder to !RTTIBuilder.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1376
diff changeset
22 RTTIBuilder(ClassDeclaration* base_class);
1374
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
23
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
24 void push(llvm::Constant* C);
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
25 void push_null_vp();
1375
63f4afd01036 Cleaned up TypeInfo_Struct.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1374
diff changeset
26 void push_null_void_array();
63f4afd01036 Cleaned up TypeInfo_Struct.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1374
diff changeset
27 void push_uint(unsigned u);
63f4afd01036 Cleaned up TypeInfo_Struct.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1374
diff changeset
28 void push_size(uint64_t s);
63f4afd01036 Cleaned up TypeInfo_Struct.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1374
diff changeset
29 void push_string(const char* str);
1374
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
30 void push_typeinfo(Type* t);
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
31 void push_classinfo(ClassDeclaration* cd);
1375
63f4afd01036 Cleaned up TypeInfo_Struct.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1374
diff changeset
32 void push_funcptr(FuncDeclaration* fd);
1376
a5d0e04298a8 Cleaned up TypeInfo_Tuple generation.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1375
diff changeset
33 void push_void_array(uint64_t dim, llvm::Constant* ptr);
a5d0e04298a8 Cleaned up TypeInfo_Tuple generation.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1375
diff changeset
34 void push_void_array(llvm::Constant* CI, Type* valtype, Dsymbol* mangle_sym);
a5d0e04298a8 Cleaned up TypeInfo_Tuple generation.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1375
diff changeset
35 void push_array(llvm::Constant* CI, uint64_t dim, Type* valtype, Dsymbol* mangle_sym);
1375
63f4afd01036 Cleaned up TypeInfo_Struct.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1374
diff changeset
36
63f4afd01036 Cleaned up TypeInfo_Struct.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents: 1374
diff changeset
37 /// Creates the initializer constant and assigns it to the global.
1374
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
38 void finalize(IrGlobal* tid);
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
39 };
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
40
e630ff79e10d Cleaned up TypeInfo generation, still need to do TypeInfo_Struct/Tuple. Eventually do ClassInfo and ModuleInfo as well using same interface.
Tomas Lindquist Olsen <tomas.l.olsen gmail com>
parents:
diff changeset
41 #endif