]> git.lizzy.rs Git - rust.git/commit
Auto merge of #86873 - nikic:opaque-ptrs, r=nagisa
authorbors <bors@rust-lang.org>
Sat, 10 Jul 2021 19:01:41 +0000 (19:01 +0000)
committerbors <bors@rust-lang.org>
Sat, 10 Jul 2021 19:01:41 +0000 (19:01 +0000)
commit432e145bd5a974c5b6f4dd9b352891bd7502b69d
treed183ea94a9b3b6687739e2d5280ee0eae1d25d42
parenta31431fce770ff90a347fd6114ac294e4568cbd8
parent2ce1addeba5030eaa5d5dbdf2cc2a9c53a107c06
Auto merge of #86873 - nikic:opaque-ptrs, r=nagisa

Improve opaque pointers support

Opaque pointers are coming, and rustc is not ready.

This adds partial support by passing an explicit load type to LLVM. Two issues I've encountered:
 * The necessary type was not available at the point where non-temporal copies were generated. I've pushed the code for that upwards out of the memcpy implementation and moved the position of a cast to make do with the types we have available. (I'm not sure that cast is needed at all, but have retained it in the interest of conservativeness.)
 * The `PlaceRef::project_deref()` function used during debuginfo generation seems to be buggy in some way -- though I haven't figured out specifically what it does wrong. Replacing it with `load_operand().deref()` did the trick, but I don't really know what I'm doing here.