comparison gen/runtime.cpp @ 244:a95056b3c996 trunk

[svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB. Did a lot of smaller cleans up here and there. Replaced more llvm::Foo with LLFoo for common stuff. Split up tollvm.cpp.
author lindquist
date Mon, 09 Jun 2008 09:37:08 +0200
parents 0db62b770a49
children a3b7c19c866c
comparison
equal deleted inserted replaced
243:4d006f7b2ada 244:a95056b3c996
156 } 156 }
157 157
158 static const LLType* rt_dg1() 158 static const LLType* rt_dg1()
159 { 159 {
160 std::vector<const LLType*> types; 160 std::vector<const LLType*> types;
161 types.push_back(rt_ptr(llvm::Type::Int8Ty)); 161 types.push_back(rt_ptr(LLType::Int8Ty));
162 types.push_back(rt_ptr(llvm::Type::Int8Ty)); 162 types.push_back(rt_ptr(LLType::Int8Ty));
163 const llvm::FunctionType* fty = llvm::FunctionType::get(llvm::Type::Int32Ty, types, false); 163 const llvm::FunctionType* fty = llvm::FunctionType::get(LLType::Int32Ty, types, false);
164 164
165 std::vector<const LLType*> t; 165 std::vector<const LLType*> t;
166 t.push_back(rt_ptr(llvm::Type::Int8Ty)); 166 t.push_back(rt_ptr(LLType::Int8Ty));
167 t.push_back(rt_ptr(fty)); 167 t.push_back(rt_ptr(fty));
168 return rt_ptr(llvm::StructType::get(t)); 168 return rt_ptr(llvm::StructType::get(t));
169 } 169 }
170 170
171 static const LLType* rt_dg2() 171 static const LLType* rt_dg2()
172 { 172 {
173 std::vector<const LLType*> types; 173 std::vector<const LLType*> types;
174 types.push_back(rt_ptr(llvm::Type::Int8Ty)); 174 types.push_back(rt_ptr(LLType::Int8Ty));
175 types.push_back(rt_ptr(llvm::Type::Int8Ty)); 175 types.push_back(rt_ptr(LLType::Int8Ty));
176 types.push_back(rt_ptr(llvm::Type::Int8Ty)); 176 types.push_back(rt_ptr(LLType::Int8Ty));
177 const llvm::FunctionType* fty = llvm::FunctionType::get(llvm::Type::Int32Ty, types, false); 177 const llvm::FunctionType* fty = llvm::FunctionType::get(LLType::Int32Ty, types, false);
178 178
179 std::vector<const LLType*> t; 179 std::vector<const LLType*> t;
180 t.push_back(rt_ptr(llvm::Type::Int8Ty)); 180 t.push_back(rt_ptr(LLType::Int8Ty));
181 t.push_back(rt_ptr(fty)); 181 t.push_back(rt_ptr(fty));
182 return rt_ptr(llvm::StructType::get(t)); 182 return rt_ptr(llvm::StructType::get(t));
183 } 183 }
184 184
185 static void LLVM_D_BuildRuntimeModule() 185 static void LLVM_D_BuildRuntimeModule()
186 { 186 {
187 M = new llvm::Module("llvmdc internal runtime"); 187 M = new llvm::Module("llvmdc internal runtime");
188 188
189 const LLType* voidTy = llvm::Type::VoidTy; 189 const LLType* voidTy = LLType::VoidTy;
190 const LLType* boolTy = llvm::Type::Int1Ty; 190 const LLType* boolTy = LLType::Int1Ty;
191 const LLType* byteTy = llvm::Type::Int8Ty; 191 const LLType* byteTy = LLType::Int8Ty;
192 const LLType* shortTy = llvm::Type::Int16Ty; 192 const LLType* shortTy = LLType::Int16Ty;
193 const LLType* intTy = llvm::Type::Int32Ty; 193 const LLType* intTy = LLType::Int32Ty;
194 const LLType* longTy = llvm::Type::Int64Ty; 194 const LLType* longTy = LLType::Int64Ty;
195 const LLType* floatTy = llvm::Type::FloatTy; 195 const LLType* floatTy = LLType::FloatTy;
196 const LLType* doubleTy = llvm::Type::DoubleTy; 196 const LLType* doubleTy = LLType::DoubleTy;
197 const LLType* sizeTy = DtoSize_t(); 197 const LLType* sizeTy = DtoSize_t();
198 const LLType* voidPtrTy = rt_ptr(byteTy); 198 const LLType* voidPtrTy = rt_ptr(byteTy);
199 const LLType* stringTy = rt_array(byteTy); 199 const LLType* stringTy = rt_array(byteTy);
200 const LLType* wstringTy = rt_array(shortTy); 200 const LLType* wstringTy = rt_array(shortTy);
201 const LLType* dstringTy = rt_array(intTy); 201 const LLType* dstringTy = rt_array(intTy);