mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
Adapt to free functions in dmd
C++ namespace now
This commit is contained in:
parent
217888ff47
commit
9041c0bf67
37 changed files with 132 additions and 64 deletions
|
@ -32,6 +32,8 @@
|
|||
#include "ir/irtype.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
|
||||
using namespace dmd;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
IrFuncTy &DtoIrTypeFunction(DValue *fnval) {
|
||||
|
@ -963,7 +965,7 @@ DValue *DtoCallFunction(const Loc &loc, Type *resulttype, DValue *fnval,
|
|||
switch (rbase->ty) {
|
||||
case TY::Tarray:
|
||||
if (tf->isref()) {
|
||||
retllval = DtoBitCast(retllval, DtoType(rbase->pointerTo()));
|
||||
retllval = DtoBitCast(retllval, DtoType(pointerTo(rbase)));
|
||||
} else {
|
||||
retllval = DtoSlicePaint(retllval, DtoType(rbase));
|
||||
}
|
||||
|
@ -972,7 +974,7 @@ DValue *DtoCallFunction(const Loc &loc, Type *resulttype, DValue *fnval,
|
|||
case TY::Tsarray:
|
||||
if (nextbase->ty == TY::Tvector && !tf->isref()) {
|
||||
if (retValIsLVal) {
|
||||
retllval = DtoBitCast(retllval, DtoType(rbase->pointerTo()));
|
||||
retllval = DtoBitCast(retllval, DtoType(pointerTo(rbase)));
|
||||
} else {
|
||||
// static arrays need to be dumped to memory; use vector alignment
|
||||
retllval =
|
||||
|
@ -988,7 +990,7 @@ DValue *DtoCallFunction(const Loc &loc, Type *resulttype, DValue *fnval,
|
|||
case TY::Taarray:
|
||||
case TY::Tpointer:
|
||||
if (tf->isref()) {
|
||||
retllval = DtoBitCast(retllval, DtoType(rbase->pointerTo()));
|
||||
retllval = DtoBitCast(retllval, DtoType(pointerTo(rbase)));
|
||||
} else {
|
||||
retllval = DtoBitCast(retllval, DtoType(rbase));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue