diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-05-29 01:12:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-29 01:12:30 +0200 |
| commit | 239287f013b21d18c8ddd5bf5419629d43dca484 (patch) | |
| tree | 8370d6dac6dfdae06b82d23e097b46472e026673 /compiler/rustc_codegen_ssa/src/lib.rs | |
| parent | 376163a77cda823c4e1bdedd48039609069e6b58 (diff) | |
| parent | 7ac62ce75cef963017245287f0a7b140e09589d7 (diff) | |
| download | rust-239287f013b21d18c8ddd5bf5419629d43dca484.tar.gz rust-239287f013b21d18c8ddd5bf5419629d43dca484.zip | |
Rollup merge of #97028 - ridwanabdillahi:pretty-printer, r=michaelwoerister
Add support for embedding pretty printers via `#[debugger_visualizer]` attribute Initial support for [RFC 3191](https://github.com/rust-lang/rfcs/pull/3191) in PR https://github.com/rust-lang/rust/pull/91779 was scoped to supporting embedding NatVis files using a new attribute. This PR implements the pretty printer support as stated in the RFC mentioned above. This change includes embedding pretty printers in the `.debug_gdb_scripts` just as the pretty printers for rustc are embedded today. Also added additional tests for embedded pretty printers. Additionally cleaned up error checking so all error checking is done up front regardless of the current target. RFC: https://github.com/rust-lang/rfcs/pull/3191
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/lib.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs index 9e1fe588c53..7fde700be39 100644 --- a/compiler/rustc_codegen_ssa/src/lib.rs +++ b/compiler/rustc_codegen_ssa/src/lib.rs @@ -36,6 +36,7 @@ use rustc_session::cstore::{self, CrateSource}; use rustc_session::utils::NativeLibKind; use rustc_span::symbol::Symbol; use rustc_span::DebuggerVisualizerFile; +use std::collections::BTreeSet; use std::path::{Path, PathBuf}; pub mod back; @@ -157,7 +158,7 @@ pub struct CrateInfo { pub missing_lang_items: FxHashMap<CrateNum, Vec<LangItem>>, pub dependency_formats: Lrc<Dependencies>, pub windows_subsystem: Option<String>, - pub debugger_visualizers: FxHashMap<CrateNum, Vec<DebuggerVisualizerFile>>, + pub natvis_debugger_visualizers: BTreeSet<DebuggerVisualizerFile>, } #[derive(Encodable, Decodable)] |
