diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2014-09-08 19:27:06 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2014-09-09 15:14:36 -0400 |
| commit | 9639cafd3625429ea558d3202cffdfc851fcf9cf (patch) | |
| tree | 54b7d3db59b8e6d398ae6d874d4655822536af9a /src/rustllvm/PassWrapper.cpp | |
| parent | b625d43f8fd2e9a800ca8a419f7d3f5f52604205 (diff) | |
| download | rust-9639cafd3625429ea558d3202cffdfc851fcf9cf.tar.gz rust-9639cafd3625429ea558d3202cffdfc851fcf9cf.zip | |
fixes for Box<[T]>
The pointer in the slice must not be null, because enum representations make that assumption. The `exchange_malloc` function returns a non-null sentinel for the zero size case, and it must not be passed to the `exchange_free` lang item. Since the length is always equal to the true capacity, a branch on the length is enough for most types. Slices of zero size types are statically special cased to never attempt deallocation. This is the same implementation as `Vec<T>`. Closes #14395
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
