diff options
| author | bors <bors@rust-lang.org> | 2017-11-17 13:30:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-17 13:30:24 +0000 |
| commit | aabfed5e0c84211005c1cb2ecec2206a574a5146 (patch) | |
| tree | edc59b43eb6a480f2a84fc7b4ed90072b713acd2 /src/rustllvm/RustWrapper.cpp | |
| parent | 02eed2e9a59c0b5df3260b38346562b85a7f3b44 (diff) | |
| parent | 6db68938ac3cb510f196c2649cea397aba403c9c (diff) | |
| download | rust-aabfed5e0c84211005c1cb2ecec2206a574a5146.tar.gz rust-aabfed5e0c84211005c1cb2ecec2206a574a5146.zip | |
Auto merge of #45996 - eddyb:even-mirer-1, r=arielb1
MIR: hide .rodata constants vs by-ref ABI clash in trans. Back in #45380, constants were copied into locals during MIR creation to ensure that arguments ' memory can be used by the callee, if the constant is placed in `.rodata` and the ABI passes it by-ref. However, there are several drawbacks (see https://github.com/rust-lang/rust/pull/45380#discussion_r150447709), most importantly the complication of constant propagation (UB if a constant ends up in `Call` arguments) and inconveniencing analyses. Instead, I've modified the `rustc_trans` implementation of calls to copy an `Operand::Constant` argument locally if it's not immediate, and added a test that segfaults without the copy. cc @dotdash @arielb1
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
