]> git.lizzy.rs Git - rust.git/commit
Consolidate checking for msvc when generating debuginfo
authorWesley Wiser <wesleywiser@microsoft.com>
Tue, 28 Dec 2021 21:57:18 +0000 (16:57 -0500)
committerWesley Wiser <wesleywiser@microsoft.com>
Fri, 7 Jan 2022 17:36:09 +0000 (12:36 -0500)
commit836addcbc4fa825e07c78c6feb7f6a0b776ed41a
tree005f5ab019dcb18874ee3569433d3a24a47e1ddb
parentf8abed9ed48bace6be0087bcd44ed534e239b8d8
Consolidate checking for msvc when generating debuginfo

If the target we're generating code for is msvc, then we do two main
things differently: we generate type names in a C++ style instead of a
Rust style and we generate debuginfo for enums differently.

I've refactored the code so that there is one function
(`cpp_like_debuginfo`) which determines if we should use the C++ style
of naming types and other debuginfo generation or the regular Rust one.
compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs