Permalink
5 comments
on commit
sign in to comment.
Browse files
debuginfo: Make names of types in debuginfo reliable and omit source …
…locations from debug info type descriptions. So far, type names generated for debuginfo where a bit sketchy. It was not clearly defined when a name should be fully qualified and when not, if region parameters should be shown or not, and other things like that. This commit makes the debuginfo module responsible for creating type names instead of using ppaux::ty_to_str() and brings type names, as they show up in the DWARF information, in line with GCC and Clang: * The name of the type being described is unqualified. It's path is defined by its position in the namespace hierarchy. * Type arguments are always fully qualified, no matter if they would actually be in scope at the type definition location. Care is also taken to reliably make type names consistent across crate boundaries. That is, the code now tries make the type name the same, regardless if the type is in the local crate or reconstructed from metadata. Otherwise LLVM will complain about violating the one-definition-rule when using link-time-optimization. This commit also removes all source location information from type descriptions because these cannot be reconstructed for types instantiated from metadata. Again, with LTO enabled, this can lead to two versions of the debuginfo type description, one with and one without source location information, which then triggers the LLVM ODR assertion. Fortunately, source location information about types is rarely used, so this has little impact. Once source location information is preserved in metadata (#1972) it can also be reenabled for type descriptions.
- Loading branch information...
Showing
with
744 additions
and 184 deletions.
- +411 −184 src/librustc/middle/trans/debuginfo.rs
- +333 −0 src/test/debuginfo/type-names.rs
Oops, something went wrong.
This comment has been minimized.
bors repliedJul 3, 2014
saw approval from luqmana
at michaelwoerister@40e0541
This comment has been minimized.
bors repliedJul 3, 2014
merging michaelwoerister/rust/cross-crate-stability = 40e0541 into auto
This comment has been minimized.
bors repliedJul 3, 2014
michaelwoerister/rust/cross-crate-stability = 40e0541 merged ok, testing candidate = 550cc04
This comment has been minimized.
bors repliedJul 3, 2014
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/155
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/156
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/156
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/156
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/159
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/160
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/159
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/165
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/160
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/159
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/162
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/160
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/159
This comment has been minimized.
bors repliedJul 3, 2014
fast-forwarding master to auto = 550cc04