
The type mapping in IRMover currently has a decent amount of complexity related to establishing isomorphism between opaque struct types and non-opaque struct types. I believe that this is both largely useless at this point (after some recent clarifications, essentially the only place where opaque types can still appear are external gobals) and has never been entirely correct in the first place (because it does this in part purely based on name rather than use, which means that we effectively end up assigning semantics to the type name, which is illegal). As such, I'd like to remove this functionality entirely.
15 lines
319 B
LLVM
15 lines
319 B
LLVM
; RUN: llvm-link -S -o - %p/pr22807.ll %p/Inputs/pr22807.ll 2>&1 | FileCheck %s
|
|
|
|
; CHECK: %struct.B = type { %struct.A }
|
|
; CHECK: %struct.A = type opaque
|
|
; CHECK: @g = external global %struct.B
|
|
|
|
%struct.B = type { %struct.A }
|
|
%struct.A = type opaque
|
|
|
|
@g = external global %struct.B
|
|
|
|
define ptr @test() {
|
|
ret ptr @g
|
|
}
|