Skip to content

Commit 41b3979

Browse files
author
Eric Holk
committed
Nicer printer of LLVM array types.
1 parent 219351e commit 41b3979

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/comp/lib/llvm.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,10 @@ fn type_to_str_inner(type_names names,
15391539
ret s;
15401540
}
15411541

1542-
case (10) { ret "Array"; }
1542+
case (10) {
1543+
auto el_ty = llvm::LLVMGetElementType(ty);
1544+
ret "[" + type_to_str_inner(names, outer, el_ty) + "]";
1545+
}
15431546

15441547
case (11) {
15451548
let uint i = 0u;

0 commit comments

Comments
 (0)