Mercurial > projects > ldc
comparison gen/arrays.cpp @ 778:4adf0f742896
Get rid of DtoBoolean - use DtoCast(... Type::tbool) instead.
Fixed some casts to bool that were using truncation.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 22 Nov 2008 18:35:52 +0100 |
parents | f04dde6e882c |
children | 661384d6a936 |
comparison
equal
deleted
inserted
replaced
777:961e249eb2aa | 778:4adf0f742896 |
---|---|
943 else if (totype->ty == Tsarray) { | 943 else if (totype->ty == Tsarray) { |
944 if (Logger::enabled()) | 944 if (Logger::enabled()) |
945 Logger::cout() << "to sarray" << '\n'; | 945 Logger::cout() << "to sarray" << '\n'; |
946 assert(0); | 946 assert(0); |
947 } | 947 } |
948 else if (totype->ty == Tbool) { | |
949 // return (arr.ptr !is null) | |
950 LLValue* ptr = DtoArrayPtr(u); | |
951 LLConstant* nul = getNullPtr(ptr->getType()); | |
952 rval = gIR->ir->CreateICmpNE(ptr, nul, "tmp"); | |
953 } | |
948 else { | 954 else { |
949 assert(0); | 955 assert(0); |
950 } | 956 } |
951 | 957 |
952 if (isslice) { | 958 if (isslice) { |