diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2014-09-24 08:49:38 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2014-09-25 14:17:14 +0200 |
| commit | 302486e49bca590347d018665c339c512168da08 (patch) | |
| tree | 983ecadd6e00bc363d9363a2a60dcd33ff59f23f /src/rustllvm/PassWrapper.cpp | |
| parent | d299bafb31a7c0528e690e48ec6d5591f1eb0bac (diff) | |
| download | rust-302486e49bca590347d018665c339c512168da08.tar.gz rust-302486e49bca590347d018665c339c512168da08.zip | |
debuginfo: Make sure that all calls to drop glue are associated with debug locations.
This commit makes rustc emit debug locations for all call and invoke statements in LLVM IR, if they are contained within a function that debuginfo is enabled for. This is important because LLVM does not handle the case where a function body containing debuginfo is inlined into another function with debuginfo, but the inlined call statement does not have a debug location. In this case, LLVM will not know where (in terms of source code coordinates) the function was inlined to and we end up with some statements still linked to the source locations in there original, non-inlined function without any indication that they are indeed an inline-copy. Later, when generating DWARF from the IR, LLVM will interpret this as corrupt IR and abort. Unfortunately, the undesirable case described above can still occur when using LTO. If there is a crate compiled without debuginfo calling into a crate compiled with debuginfo, we again end up with the conditions triggering the error. This is why some LTO tests still fail with the dreaded assertion, if the standard library was built with debuginfo enabled. That is, `RUSTFLAGS_STAGE2=-g make rustc-stage2` will succeed but `RUSTFLAGS_STAGE2=-g make check` will still fail after this commit has been merged. This is a problem that has to be dealt with separately. Fixes #17201 Fixes #15816 Fixes #15156
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
