llvm-hs-pretty
llvm-hs-pretty copied to clipboard
Handle named references in structs correctly
The added test-case would previously fail since:
; ModuleID = 'simple module'
%struct.coord2d = type {i32, i32}
%struct.vector = type {%struct.coord2d, %struct.coord2d}
@up = global %struct.vector {%struct.coord2d {i32 0, i32 0}, %struct.coord2d {i32 0, i32 1}}
would get pretty-printed as invalid code:
; ModuleID = 'simple module'
%struct.coord2d = type {i32, i32}
%struct.vector = type {%struct.coord2d, %struct.coord2d}
@up = global %struct.vector {%struct.coord2d zeroinitializer, {i32 0, i32 0} {i32 0, i32 1}}
To run the tests, I had to update the nix support, that had bitrot