Mercurial > projects > ldc
comparison gen/todebug.cpp @ 486:a34078905d01
Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Reimplemented support for nested functions/class using a new approach.
Added error on taking address of intrinsic.
Fixed problems with the ->syntaxCopy of TypeFunction delegate exp.
Removed DtoDType and replaced all uses with ->toBasetype() instead.
Removed unused inplace stuff.
Fixed a bunch of issues in the runtime unittests, not complete yet.
Added mini tests.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 10 Aug 2008 08:37:38 +0200 |
parents | 297690b5d4a5 |
children | 1b62222581fb |
comparison
equal
deleted
inserted
replaced
485:50f6e2337a6b | 486:a34078905d01 |
---|---|
237 ////////////////////////////////////////////////////////////////////////////////////////////////// | 237 ////////////////////////////////////////////////////////////////////////////////////////////////// |
238 | 238 |
239 static LLGlobalVariable* dwarfDerivedType(Type* type, llvm::GlobalVariable* compileUnit) | 239 static LLGlobalVariable* dwarfDerivedType(Type* type, llvm::GlobalVariable* compileUnit) |
240 { | 240 { |
241 const LLType* T = DtoType(type); | 241 const LLType* T = DtoType(type); |
242 Type* t = DtoDType(type); | 242 Type* t = type->toBasetype(); |
243 | 243 |
244 // defaults | 244 // defaults |
245 LLConstant* name = getNullPtr(getVoidPtrType()); | 245 LLConstant* name = getNullPtr(getVoidPtrType()); |
246 | 246 |
247 // find tag | 247 // find tag |
298 ////////////////////////////////////////////////////////////////////////////////////////////////// | 298 ////////////////////////////////////////////////////////////////////////////////////////////////// |
299 | 299 |
300 static LLGlobalVariable* dwarfMemberType(unsigned linnum, Type* type, LLGlobalVariable* compileUnit, LLGlobalVariable* definedCU, const char* c_name, unsigned offset) | 300 static LLGlobalVariable* dwarfMemberType(unsigned linnum, Type* type, LLGlobalVariable* compileUnit, LLGlobalVariable* definedCU, const char* c_name, unsigned offset) |
301 { | 301 { |
302 const LLType* T = DtoType(type); | 302 const LLType* T = DtoType(type); |
303 Type* t = DtoDType(type); | 303 Type* t = type->toBasetype(); |
304 | 304 |
305 // defaults | 305 // defaults |
306 LLConstant* name; | 306 LLConstant* name; |
307 if (c_name) | 307 if (c_name) |
308 name = DtoConstStringPtr(c_name, "llvm.metadata"); | 308 name = DtoConstStringPtr(c_name, "llvm.metadata"); |
354 ////////////////////////////////////////////////////////////////////////////////////////////////// | 354 ////////////////////////////////////////////////////////////////////////////////////////////////// |
355 | 355 |
356 static LLGlobalVariable* dwarfCompositeType(Type* type, llvm::GlobalVariable* compileUnit) | 356 static LLGlobalVariable* dwarfCompositeType(Type* type, llvm::GlobalVariable* compileUnit) |
357 { | 357 { |
358 const LLType* T = DtoType(type); | 358 const LLType* T = DtoType(type); |
359 Type* t = DtoDType(type); | 359 Type* t = type->toBasetype(); |
360 | 360 |
361 // defaults | 361 // defaults |
362 LLConstant* name = getNullPtr(getVoidPtrType()); | 362 LLConstant* name = getNullPtr(getVoidPtrType()); |
363 LLGlobalVariable* members = NULL; | 363 LLGlobalVariable* members = NULL; |
364 unsigned linnum = 0; | 364 unsigned linnum = 0; |