Mercurial > projects > ldc
diff gen/complex.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 | 672eb4893b55 |
children | fbb1a366cfbc |
line wrap: on
line diff
--- a/gen/complex.cpp Sat Aug 09 09:03:52 2008 +0200 +++ b/gen/complex.cpp Sun Aug 10 08:37:38 2008 +0200 @@ -13,7 +13,7 @@ const llvm::StructType* DtoComplexType(Type* type) { - Type* t = DtoDType(type); + Type* t = type->toBasetype(); const LLType* base = DtoComplexBaseType(t); @@ -26,7 +26,7 @@ const LLType* DtoComplexBaseType(Type* t) { - TY ty = DtoDType(t)->ty; + TY ty = t->toBasetype()->ty; const LLType* base; if (ty == Tcomplex32) { return LLType::FloatTy; @@ -62,7 +62,7 @@ LLConstant* DtoConstComplex(Type* _ty, long double re, long double im) { - TY ty = DtoDType(_ty)->ty; + TY ty = _ty->toBasetype()->ty; llvm::ConstantFP* fre; llvm::ConstantFP* fim; @@ -106,7 +106,7 @@ DValue* DtoComplex(Loc& loc, Type* to, DValue* val) { - Type* t = DtoDType(val->getType()); + Type* t = val->getType()->toBasetype(); if (val->isComplex() || t->iscomplex()) { return DtoCastComplex(loc, val, to); @@ -448,7 +448,7 @@ DValue* DtoCastComplex(Loc& loc, DValue* val, Type* _to) { - Type* to = DtoDType(_to); + Type* to = _to->toBasetype(); Type* vty = val->getType(); if (to->iscomplex()) { if (vty->size() == to->size())