1
Fork 0

Rollup merge of #126502 - cuviper:dump-mir-exclude-alloc-bytes, r=estebank

Ignore allocation bytes in some mir-opt tests

This adds `rustc -Zdump-mir-exclude-alloc-bytes` to skip writing allocation bytes in MIR dumps, and applies it to tests that were failing on s390x due to its big-endian byte order.

Fixes #126261
This commit is contained in:
Jubilee 2024-07-12 13:47:05 -07:00 committed by GitHub
commit 5d56572f06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 225 additions and 410 deletions

View file

@ -1545,6 +1545,9 @@ impl<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes> std::fmt::Display
// We are done.
return write!(w, " {{}}");
}
if tcx.sess.opts.unstable_opts.dump_mir_exclude_alloc_bytes {
return write!(w, " {{ .. }}");
}
// Write allocation bytes.
writeln!(w, " {{")?;
write_allocation_bytes(tcx, alloc, w, " ")?;