mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 07:30:43 +03:00
Use llvm_unreachable instead of assert(0).
Also removed some unused functions.
This commit is contained in:
parent
28a65ff689
commit
8ff3a8060a
18 changed files with 68 additions and 166 deletions
|
@ -1207,8 +1207,7 @@ LLValue* DtoArrayLen(DValue* v)
|
|||
TypeSArray *sarray = static_cast<TypeSArray*>(v->type->toBasetype());
|
||||
return DtoConstSize_t(sarray->dim->toUInteger());
|
||||
}
|
||||
assert(0 && "unsupported array for len");
|
||||
return 0;
|
||||
llvm_unreachable("unsupported array for len");
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1232,8 +1231,8 @@ LLValue* DtoArrayPtr(DValue* v)
|
|||
assert(!v->isNull());
|
||||
return DtoGEPi(v->getRVal(), 0,0);
|
||||
}
|
||||
assert(0);
|
||||
return 0;
|
||||
|
||||
llvm_unreachable("Unexpected array type.");
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue