mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
debuginfo: Refactor debuginfo generation for types -- Run x.py fmt
This commit is contained in:
parent
5144661d6b
commit
07a1194edf
@ -128,4 +128,4 @@ in the middle of the prologue, however, they are ignored by LLVM's prologue
|
||||
detection. The `create_argument_metadata()` and related functions take care
|
||||
of linking the `llvm.dbg.declare` instructions to the correct source
|
||||
locations even while source location emission is still disabled, so there
|
||||
is no need to do anything special with source location handling here.
|
||||
is no need to do anything special with source location handling here.
|
||||
|
@ -1022,9 +1022,11 @@ fn build_upvar_field_di_nodes<'ll, 'tcx>(
|
||||
}
|
||||
};
|
||||
|
||||
debug_assert!(up_var_tys
|
||||
.iter()
|
||||
.all(|&t| t == cx.tcx.normalize_erasing_regions(ParamEnv::reveal_all(), t)));
|
||||
debug_assert!(
|
||||
up_var_tys
|
||||
.iter()
|
||||
.all(|&t| t == cx.tcx.normalize_erasing_regions(ParamEnv::reveal_all(), t))
|
||||
);
|
||||
|
||||
let capture_names = closure_saved_names_of_captured_variables(cx.tcx, def_id);
|
||||
let layout = cx.layout_of(closure_or_generator_ty);
|
||||
|
@ -263,19 +263,11 @@ impl<'test> TestCx<'test> {
|
||||
Ui | MirOpt => false,
|
||||
mode => panic!("unimplemented for mode {:?}", mode),
|
||||
};
|
||||
if test_should_run {
|
||||
self.run_if_enabled()
|
||||
} else {
|
||||
WillExecute::No
|
||||
}
|
||||
if test_should_run { self.run_if_enabled() } else { WillExecute::No }
|
||||
}
|
||||
|
||||
fn run_if_enabled(&self) -> WillExecute {
|
||||
if self.config.run_enabled() {
|
||||
WillExecute::Yes
|
||||
} else {
|
||||
WillExecute::Disabled
|
||||
}
|
||||
if self.config.run_enabled() { WillExecute::Yes } else { WillExecute::Disabled }
|
||||
}
|
||||
|
||||
fn should_run_successfully(&self, pm: Option<PassMode>) -> bool {
|
||||
@ -2029,11 +2021,7 @@ impl<'test> TestCx<'test> {
|
||||
Some(ref s) => s
|
||||
.split(' ')
|
||||
.filter_map(|s| {
|
||||
if s.chars().all(|c| c.is_whitespace()) {
|
||||
None
|
||||
} else {
|
||||
Some(s.to_owned())
|
||||
}
|
||||
if s.chars().all(|c| c.is_whitespace()) { None } else { Some(s.to_owned()) }
|
||||
})
|
||||
.collect(),
|
||||
None => Vec::new(),
|
||||
@ -2092,11 +2080,7 @@ impl<'test> TestCx<'test> {
|
||||
/// The revision, ignored for incremental compilation since it wants all revisions in
|
||||
/// the same directory.
|
||||
fn safe_revision(&self) -> Option<&str> {
|
||||
if self.config.mode == Incremental {
|
||||
None
|
||||
} else {
|
||||
self.revision
|
||||
}
|
||||
if self.config.mode == Incremental { None } else { self.revision }
|
||||
}
|
||||
|
||||
/// Gets the absolute path to the directory where all output for the given
|
||||
@ -2251,11 +2235,7 @@ impl<'test> TestCx<'test> {
|
||||
|
||||
fn charset() -> &'static str {
|
||||
// FreeBSD 10.1 defaults to GDB 6.1.1 which doesn't support "auto" charset
|
||||
if cfg!(target_os = "freebsd") {
|
||||
"ISO-8859-1"
|
||||
} else {
|
||||
"UTF-8"
|
||||
}
|
||||
if cfg!(target_os = "freebsd") { "ISO-8859-1" } else { "UTF-8" }
|
||||
}
|
||||
|
||||
fn run_rustdoc_test(&self) {
|
||||
@ -3045,11 +3025,7 @@ impl<'test> TestCx<'test> {
|
||||
let (stderr_kind, stdout_kind) = match output_kind {
|
||||
TestOutput::Compile => (
|
||||
{
|
||||
if self.props.stderr_per_bitwidth {
|
||||
&stderr_bits
|
||||
} else {
|
||||
UI_STDERR
|
||||
}
|
||||
if self.props.stderr_per_bitwidth { &stderr_bits } else { UI_STDERR }
|
||||
},
|
||||
UI_STDOUT,
|
||||
),
|
||||
@ -3746,11 +3722,7 @@ impl<'test> TestCx<'test> {
|
||||
for output_file in files {
|
||||
println!("Actual {} saved to {}", kind, output_file.display());
|
||||
}
|
||||
if self.config.bless {
|
||||
0
|
||||
} else {
|
||||
1
|
||||
}
|
||||
if self.config.bless { 0 } else { 1 }
|
||||
}
|
||||
|
||||
fn prune_duplicate_output(&self, mode: CompareMode, kind: &str, canon_content: &str) {
|
||||
|
Loading…
Reference in New Issue
Block a user