mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-24 00:33:12 +01:00
D2: pass static arrays into functions by value
This commit is contained in:
@@ -176,7 +176,7 @@ const llvm::Type * IrTypeSArray::sarray2llvm(Type * t)
|
||||
const llvm::Type* elemType = DtoType(t->nextOf());
|
||||
if (elemType == llvm::Type::getVoidTy(llvm::getGlobalContext()))
|
||||
elemType = llvm::Type::getInt8Ty(llvm::getGlobalContext());
|
||||
return llvm::ArrayType::get(elemType, dim);
|
||||
return llvm::ArrayType::get(elemType, dim == 0 ? 1 : dim);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user