diff options
| author | bors <bors@rust-lang.org> | 2018-05-30 11:35:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-30 11:35:00 +0000 |
| commit | 4f99f37b7e213d69a489884f651adfc6d217cef5 (patch) | |
| tree | 8b12fd25064a7c3df77c522bdff475e83aff8e23 /src/rustllvm/RustWrapper.cpp | |
| parent | 20af72b943527d584df4b99e157262f9b297b3e4 (diff) | |
| parent | a4d899b4a1248f885563e241fa56fe9f69616dc2 (diff) | |
| download | rust-4f99f37b7e213d69a489884f651adfc6d217cef5.tar.gz rust-4f99f37b7e213d69a489884f651adfc6d217cef5.zip | |
Auto merge of #50880 - glandium:oom, r=SimonSapin
OOM handling changes As discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-384893456 and subsequent. This does have codegen implications. Even without the hooks, and with a handler that ignores the arguments, the compiler doesn't eliminate calling `rust_oom` with the `Layout`. Even if it managed to eliminate that, with the hooks, I don't know if the compiler would be able to figure out it can skip it if the hook is never set. A couple implementation notes: - I went with explicit enums rather than bools because it makes it clearer in callers what is being requested. - I didn't know what `feature` to put the hook setting functions behind. (and surprisingly, the compile went through without any annotation on the functions) - There's probably some bikeshedding to do on the naming. Cc: @Simonsapin, @sfackler
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
