mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Fixed #55 — Illegal instruction
Don't artificially set zero-length arrays to dimension 1.
This commit is contained in:
@@ -193,7 +193,7 @@ llvm::Type * IrTypeSArray::sarray2llvm(Type * t)
|
||||
LLType* elemType = DtoType(t->nextOf());
|
||||
if (elemType == llvm::Type::getVoidTy(llvm::getGlobalContext()))
|
||||
elemType = llvm::Type::getInt8Ty(llvm::getGlobalContext());
|
||||
return llvm::ArrayType::get(elemType, dim == 0 ? 1 : dim);
|
||||
return llvm::ArrayType::get(elemType, dim);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user