Rename debugging_opts to unstable_opts
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
This commit is contained in:
@@ -8,7 +8,7 @@ pub fn mir_fn_to_generic_graph<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'_>) -> Grap
|
||||
let def_id = body.source.def_id();
|
||||
let def_name = graphviz_safe_def_name(def_id);
|
||||
let graph_name = format!("Mir_{}", def_name);
|
||||
let dark_mode = tcx.sess.opts.debugging_opts.graphviz_dark_mode;
|
||||
let dark_mode = tcx.sess.opts.unstable_opts.graphviz_dark_mode;
|
||||
|
||||
// Nodes
|
||||
let nodes: Vec<Node> = body
|
||||
|
||||
@@ -56,11 +56,11 @@ impl<
|
||||
writeln!(w, "{} {}{} {{", kind, cluster, self.graphviz_name)?;
|
||||
|
||||
// Global graph properties
|
||||
let font = format!(r#"fontname="{}""#, tcx.sess.opts.debugging_opts.graphviz_font);
|
||||
let font = format!(r#"fontname="{}""#, tcx.sess.opts.unstable_opts.graphviz_font);
|
||||
let mut graph_attrs = vec![&font[..]];
|
||||
let mut content_attrs = vec![&font[..]];
|
||||
|
||||
let dark_mode = tcx.sess.opts.debugging_opts.graphviz_dark_mode;
|
||||
let dark_mode = tcx.sess.opts.unstable_opts.graphviz_dark_mode;
|
||||
if dark_mode {
|
||||
graph_attrs.push(r#"bgcolor="black""#);
|
||||
graph_attrs.push(r#"fontcolor="white""#);
|
||||
|
||||
@@ -57,11 +57,11 @@ where
|
||||
W: Write,
|
||||
{
|
||||
// Global graph properties
|
||||
let font = format!(r#"fontname="{}""#, tcx.sess.opts.debugging_opts.graphviz_font);
|
||||
let font = format!(r#"fontname="{}""#, tcx.sess.opts.unstable_opts.graphviz_font);
|
||||
let mut graph_attrs = vec![&font[..]];
|
||||
let mut content_attrs = vec![&font[..]];
|
||||
|
||||
let dark_mode = tcx.sess.opts.debugging_opts.graphviz_dark_mode;
|
||||
let dark_mode = tcx.sess.opts.unstable_opts.graphviz_dark_mode;
|
||||
if dark_mode {
|
||||
graph_attrs.push(r#"bgcolor="black""#);
|
||||
graph_attrs.push(r#"fontcolor="white""#);
|
||||
|
||||
@@ -1884,7 +1884,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
|
||||
|
||||
// When printing regions, add trailing space if necessary.
|
||||
let print_region = ty::tls::with(|tcx| {
|
||||
tcx.sess.verbose() || tcx.sess.opts.debugging_opts.identify_regions
|
||||
tcx.sess.verbose() || tcx.sess.opts.unstable_opts.identify_regions
|
||||
});
|
||||
let region = if print_region {
|
||||
let mut region = region.to_string();
|
||||
@@ -1954,7 +1954,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
|
||||
|
||||
AggregateKind::Closure(def_id, substs) => ty::tls::with(|tcx| {
|
||||
if let Some(def_id) = def_id.as_local() {
|
||||
let name = if tcx.sess.opts.debugging_opts.span_free_formats {
|
||||
let name = if tcx.sess.opts.unstable_opts.span_free_formats {
|
||||
let substs = tcx.lift(substs).unwrap();
|
||||
format!(
|
||||
"[closure@{}]",
|
||||
|
||||
@@ -90,7 +90,7 @@ impl<'tcx> MonoItem<'tcx> {
|
||||
let generate_cgu_internal_copies = tcx
|
||||
.sess
|
||||
.opts
|
||||
.debugging_opts
|
||||
.unstable_opts
|
||||
.inline_in_all_cgus
|
||||
.unwrap_or_else(|| tcx.sess.opts.optimize != OptLevel::No)
|
||||
&& !tcx.sess.link_dead_code();
|
||||
@@ -459,7 +459,7 @@ impl<'tcx> CodegenUnitNameBuilder<'tcx> {
|
||||
{
|
||||
let cgu_name = self.build_cgu_name_no_mangle(cnum, components, special_suffix);
|
||||
|
||||
if self.tcx.sess.opts.debugging_opts.human_readable_cgu_names {
|
||||
if self.tcx.sess.opts.unstable_opts.human_readable_cgu_names {
|
||||
cgu_name
|
||||
} else {
|
||||
Symbol::intern(&CodegenUnit::mangle_name(cgu_name.as_str()))
|
||||
|
||||
@@ -90,7 +90,7 @@ pub fn dump_mir<'tcx, F>(
|
||||
}
|
||||
|
||||
pub fn dump_enabled<'tcx>(tcx: TyCtxt<'tcx>, pass_name: &str, def_id: DefId) -> bool {
|
||||
let Some(ref filters) = tcx.sess.opts.debugging_opts.dump_mir else {
|
||||
let Some(ref filters) = tcx.sess.opts.unstable_opts.dump_mir else {
|
||||
return false;
|
||||
};
|
||||
// see notes on #41697 below
|
||||
@@ -141,7 +141,7 @@ fn dump_matched_mir_node<'tcx, F>(
|
||||
extra_data(PassWhere::AfterCFG, &mut file)?;
|
||||
};
|
||||
|
||||
if tcx.sess.opts.debugging_opts.dump_mir_graphviz {
|
||||
if tcx.sess.opts.unstable_opts.dump_mir_graphviz {
|
||||
let _: io::Result<()> = try {
|
||||
let mut file =
|
||||
create_dump_file(tcx, "dot", pass_num, pass_name, disambiguator, body.source)?;
|
||||
@@ -149,7 +149,7 @@ fn dump_matched_mir_node<'tcx, F>(
|
||||
};
|
||||
}
|
||||
|
||||
if let Some(spanview) = tcx.sess.opts.debugging_opts.dump_mir_spanview {
|
||||
if let Some(spanview) = tcx.sess.opts.unstable_opts.dump_mir_spanview {
|
||||
let _: io::Result<()> = try {
|
||||
let file_basename =
|
||||
dump_file_basename(tcx, pass_num, pass_name, disambiguator, body.source);
|
||||
@@ -175,7 +175,7 @@ fn dump_file_basename<'tcx>(
|
||||
None => String::new(),
|
||||
};
|
||||
|
||||
let pass_num = if tcx.sess.opts.debugging_opts.dump_mir_exclude_pass_number {
|
||||
let pass_num = if tcx.sess.opts.unstable_opts.dump_mir_exclude_pass_number {
|
||||
String::new()
|
||||
} else {
|
||||
match pass_num {
|
||||
@@ -214,7 +214,7 @@ fn dump_file_basename<'tcx>(
|
||||
/// graphviz data or other things.
|
||||
fn dump_path(tcx: TyCtxt<'_>, basename: &str, extension: &str) -> PathBuf {
|
||||
let mut file_path = PathBuf::new();
|
||||
file_path.push(Path::new(&tcx.sess.opts.debugging_opts.dump_mir_dir));
|
||||
file_path.push(Path::new(&tcx.sess.opts.unstable_opts.dump_mir_dir));
|
||||
|
||||
let file_name = format!("{}.{}", basename, extension,);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user