mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 09:33:27 +01:00
[svn r257] Fixed: array .sort and .reverse runtime code was incorrect.
Fixed: most runtime calls did not get correct param attrs.
This commit is contained in:
@@ -1200,6 +1200,11 @@ DValue* CallExp::toElem(IRState* p)
|
||||
|
||||
// this hack is necessary :/
|
||||
if (dfn && dfn->func && dfn->func->runTimeHack) {
|
||||
llvm::Function* fn = dfn->func->ir.irFunc->func;
|
||||
assert(fn);
|
||||
if (fn->getParamAttrs().paramHasAttr(j+1, llvm::ParamAttr::ByVal))
|
||||
palist = palist.addAttr(j+1, llvm::ParamAttr::ByVal);
|
||||
|
||||
if (llfnty->getParamType(j) != NULL) {
|
||||
if (llargs[j]->getType() != llfnty->getParamType(j)) {
|
||||
Logger::println("llvmRunTimeHack==true - force casting argument");
|
||||
|
||||
Reference in New Issue
Block a user