Fix global value colocated printing

It used to print `gv0 = colocated symbol u1:1` while cranelift-reader
expects `gv0 = symbol colocated u1:1`.
This commit is contained in:
bjorn3
2019-02-23 11:13:24 +01:00
committed by Benjamin Bouvier
parent 83edf959f2
commit 166c11af11

View File

@@ -114,10 +114,12 @@ impl fmt::Display for GlobalValueData {
offset,
colocated,
} => {
if colocated {
write!(f, "colocated ")?;
}
write!(f, "symbol {}", name)?;
write!(
f,
"symbol {}{}",
if colocated { "colocated " } else { "" },
name
)?;
let offset_val: i64 = offset.into();
if offset_val > 0 {
write!(f, "+")?;