Skip to content

Commit 61467f5

Browse files
committed
Print array dimensions in the dwarf based on the compiler
1 parent e4219e7 commit 61467f5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/util/dwarf/print.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ fn array_type_string(
130130
);
131131
match dim.size {
132132
None => out.suffix.insert_str(0, "[]"),
133-
Some(size) => out.suffix = format!("[{}]{}", size, out.suffix),
133+
Some(size) => {
134+
if info.producer == Producer::MWCC {
135+
out.suffix = format!("[{}]{}", size, out.suffix);
136+
} else {
137+
out.suffix = format!("{}[{}]", out.suffix, size);
138+
}
139+
}
134140
};
135141
}
136142
Ok(out)

0 commit comments

Comments
 (0)