mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 19:36:06 +03:00
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.
This commit is contained in:
parent
b2d860374b
commit
9d7f16b967
39 changed files with 693 additions and 455 deletions
|
@ -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 llvm::StructType* DtoComplexType(Type* type)
|
|||
|
||||
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, LLConstant* re, LLConstant* im)
|
|||
|
||||
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 @@ LLValue* DtoImagPart(DValue* val)
|
|||
|
||||
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 @@ LLValue* DtoComplexEquals(Loc& loc, TOK op, DValue* lhs, DValue* rhs)
|
|||
|
||||
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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue