Mercurial > projects > ldc
diff gen/runtime.cpp @ 797:340acf1535d0
Removed KDevelop3 project files, CMake can generate them just fine!
Fixed function literals in static initializers.
Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE.
Changed errors to go to stderr instead of stdout.
Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sat, 29 Nov 2008 21:25:43 +0100 |
parents | 661384d6a936 |
children | a8cb25d478c4 |
line wrap: on
line diff
--- a/gen/runtime.cpp Sat Nov 29 12:28:10 2008 +0100 +++ b/gen/runtime.cpp Sat Nov 29 21:25:43 2008 +0100 @@ -134,8 +134,10 @@ static void LLVM_D_BuildRuntimeModule() { + Logger::println("building module"); M = new llvm::Module("ldc internal runtime"); + Logger::println("building basic types"); const LLType* voidTy = LLType::VoidTy; const LLType* boolTy = LLType::Int1Ty; const LLType* byteTy = LLType::Int8Ty; @@ -144,6 +146,7 @@ const LLType* longTy = LLType::Int64Ty; const LLType* sizeTy = DtoSize_t(); + Logger::println("building float types"); const LLType* floatTy = LLType::FloatTy; const LLType* doubleTy = LLType::DoubleTy; const LLType* realTy; @@ -156,15 +159,22 @@ const LLType* cdoubleTy = llvm::StructType::get(doubleTy, doubleTy, NULL); const LLType* crealTy = llvm::StructType::get(realTy, realTy, NULL); + Logger::println("building aggr types"); const LLType* voidPtrTy = rt_ptr(byteTy); const LLType* stringTy = rt_array(byteTy); const LLType* wstringTy = rt_array(shortTy); const LLType* dstringTy = rt_array(intTy); - const LLType* objectTy = rt_ptr(ClassDeclaration::object->type->ir.type->get()); - const LLType* classInfoTy = rt_ptr(ClassDeclaration::classinfo->type->ir.type->get()); - const LLType* typeInfoTy = rt_ptr(Type::typeinfo->type->ir.type->get()); + + Logger::println("building class types"); + const LLType* objectTy = DtoType(ClassDeclaration::object->type); + const LLType* classInfoTy = DtoType(ClassDeclaration::classinfo->type); + const LLType* typeInfoTy = DtoType(Type::typeinfo->type); + + Logger::println("building aa type"); const LLType* aaTy = rt_ptr(llvm::OpaqueType::get()); + Logger::println("building functions"); + ///////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////