comparison gen/runtime.cpp @ 157:5c17f81fc1c1 trunk

[svn r173] moved IR state previously stored in Type into IrType and a Type->IrType map; fixes #7
author ChristianK
date Thu, 01 May 2008 13:32:08 +0200
parents 44a95ac7368a
children a8cd9bc1021a
comparison
equal deleted inserted replaced
156:ccd07d9f2ce9 157:5c17f81fc1c1
13 #include "aggregate.h" 13 #include "aggregate.h"
14 14
15 #include "gen/runtime.h" 15 #include "gen/runtime.h"
16 #include "gen/logger.h" 16 #include "gen/logger.h"
17 #include "gen/tollvm.h" 17 #include "gen/tollvm.h"
18 #include "gen/irstate.h"
18 19
19 static llvm::Module* M = NULL; 20 static llvm::Module* M = NULL;
20 static bool runtime_failed = false; 21 static bool runtime_failed = false;
21 22
22 static void LLVM_D_BuildRuntimeModule(); 23 static void LLVM_D_BuildRuntimeModule();
186 const llvm::Type* sizeTy = DtoSize_t(); 187 const llvm::Type* sizeTy = DtoSize_t();
187 const llvm::Type* voidPtrTy = rt_ptr(byteTy); 188 const llvm::Type* voidPtrTy = rt_ptr(byteTy);
188 const llvm::Type* stringTy = rt_array(byteTy); 189 const llvm::Type* stringTy = rt_array(byteTy);
189 const llvm::Type* wstringTy = rt_array(shortTy); 190 const llvm::Type* wstringTy = rt_array(shortTy);
190 const llvm::Type* dstringTy = rt_array(intTy); 191 const llvm::Type* dstringTy = rt_array(intTy);
191 const llvm::Type* objectTy = rt_ptr(ClassDeclaration::object->type->llvmType->get()); 192 const llvm::Type* objectTy = rt_ptr(gIR->irType[ClassDeclaration::object->type].type->get());
192 const llvm::Type* classInfoTy = rt_ptr(ClassDeclaration::classinfo->type->llvmType->get()); 193 const llvm::Type* classInfoTy = rt_ptr(gIR->irType[ClassDeclaration::classinfo->type].type->get());
193 const llvm::Type* typeInfoTy = rt_ptr(Type::typeinfo->type->llvmType->get()); 194 const llvm::Type* typeInfoTy = rt_ptr(gIR->irType[Type::typeinfo->type].type->get());
194 const llvm::Type* aaTy = rt_ptr(llvm::OpaqueType::get()); 195 const llvm::Type* aaTy = rt_ptr(llvm::OpaqueType::get());
195 196
196 ///////////////////////////////////////////////////////////////////////////////////// 197 /////////////////////////////////////////////////////////////////////////////////////
197 ///////////////////////////////////////////////////////////////////////////////////// 198 /////////////////////////////////////////////////////////////////////////////////////
198 ///////////////////////////////////////////////////////////////////////////////////// 199 /////////////////////////////////////////////////////////////////////////////////////