Mercurial > projects > ldc
view gen/rttibuilder.h @ 1607:207a8a438dea
Merge DMD r253: refactor: Argument => Parameter
---
dmd/arrayop.c | 30 ++++----
dmd/arraytypes.h | 2 +-
dmd/class.c | 8 +-
dmd/declaration.c | 10 ++--
dmd/declaration.h | 16 ++--
dmd/doc.c | 12 ++--
dmd/dsymbol.c | 4 +-
dmd/expression.c | 48 +++++++-------
dmd/expression.h | 32 +++++-----
dmd/func.c | 78 +++++++++++-----------
dmd/init.c | 2 +-
dmd/interpret.c | 8 +-
dmd/mtype.c | 190 ++++++++++++++++++++++++++--------------------------
dmd/mtype.h | 32 +++++-----
dmd/opover.c | 34 +++++-----
dmd/parse.c | 40 ++++++------
dmd/parse.h | 2 +-
dmd/statement.c | 90 +++++++++++++-------------
dmd/statement.h | 14 ++--
dmd/struct.c | 8 +-
dmd/template.c | 30 ++++----
gen/functions.cpp | 10 ++--
gen/functions.h | 2 +-
gen/tocall.cpp | 10 ++--
gen/typinf.cpp | 6 +-
25 files changed, 359 insertions(+), 359 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:20 -0300 |
parents | 1609490c123f |
children |
line wrap: on
line source
#ifndef __LDC_GEN_RTTIBUILDER_H__ #define __LDC_GEN_RTTIBUILDER_H__ #include "llvm/Constant.h" #include "llvm/ADT/SmallVector.h" struct ClassDeclaration; struct TypeClass; struct Type; struct IrStruct; struct RTTIBuilder { ClassDeclaration* base; TypeClass* basetype; IrStruct* baseir; // 10 is enough for any D1 TypeInfo // 14 is enough for any D1 ClassInfo llvm::SmallVector<llvm::Constant*, 14> inits; RTTIBuilder(ClassDeclaration* base_class); void push(llvm::Constant* C); void push_null(Type* T); void push_null_vp(); void push_null_void_array(); void push_uint(unsigned u); void push_size(uint64_t s); void push_string(const char* str); void push_typeinfo(Type* t); void push_classinfo(ClassDeclaration* cd); /// pushes the function pointer or a null void* if it cannot. void push_funcptr(FuncDeclaration* fd, Type* castto = NULL); /// pushes the array slice given. void push_array(uint64_t dim, llvm::Constant * ptr); /// pushes void[] slice, dim is used directly, ptr is cast to void* . void push_void_array(uint64_t dim, llvm::Constant* ptr); /// pushes void[] slice with data. /// CI is the constant initializer the array should point to, the length /// and ptr are resolved automatically void push_void_array(llvm::Constant* CI, Type* valtype, Dsymbol* mangle_sym); /// pushes valtype[] slice with data. /// CI is the constant initializer that .ptr should point to /// dim is .length member directly /// valtype provides the D element type, .ptr is cast to valtype->pointerTo() /// mangle_sym provides the mangle prefix for the symbol generated. void push_array(llvm::Constant* CI, uint64_t dim, Type* valtype, Dsymbol* mangle_sym); /// Creates the initializer constant and assigns it to the global. void finalize(IrGlobal* tid); /// Creates the initializer constant and assigns it to the global. llvm::Constant* get_constant(); }; #endif