fix slice of C pointer

closes #2002
This commit is contained in:
Andrew Kelley
2019-03-03 13:04:04 -05:00
parent e3b275fa47
commit 9c5852aa86
3 changed files with 15 additions and 3 deletions

View File

@@ -4570,7 +4570,7 @@ static LLVMValueRef ir_render_slice(CodeGen *g, IrExecutable *executable, IrInst
return tmp_struct_ptr;
} else if (array_type->id == ZigTypeIdPointer) {
assert(array_type->data.pointer.ptr_len == PtrLenUnknown);
assert(array_type->data.pointer.ptr_len != PtrLenSingle);
LLVMValueRef start_val = ir_llvm_value(g, instruction->start);
LLVMValueRef end_val = ir_llvm_value(g, instruction->end);