]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #88550 - dpaoliello:dpaoliello/allocdebuginfo, r=estebank
authorbors <bors@rust-lang.org>
Sat, 4 Sep 2021 12:27:45 +0000 (12:27 +0000)
committerbors <bors@rust-lang.org>
Sat, 4 Sep 2021 12:27:45 +0000 (12:27 +0000)
commit226e181b80fa0be755872b66916ef7e704601ec2
tree9c354d2143562358dd2dac4488cc14d7a71d95f0
parent72a51c39c69256c8a8256e775f2764a1983048d4
parent77a96ed5646f7c3ee8897693decc4626fe380643
Auto merge of #88550 - dpaoliello:dpaoliello/allocdebuginfo, r=estebank

Include debug info for the allocator shim

Issue Details:
In some cases it is necessary to generate an "allocator shim" to forward various Rust allocation functions (e.g., `__rust_alloc`) to an underlying function (e.g., `malloc`). However, since this allocator shim is a manually created LLVM module it is not processed via the normal module processing code and so no debug info is generated for it (if debugging info is enabled).

Fix Details:
* Modify the `debuginfo` code to allow creating debug info for a module without a `CodegenCx` (since it is difficult, and expensive, to create one just to emit some debug info).
* After creating the allocator shim add in basic debug info.