[Linker] Convert test to opaque pointers (NFC)
authorNikita Popov <npopov@redhat.com>
Tue, 17 Jan 2023 11:20:43 +0000 (12:20 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 17 Jan 2023 11:22:01 +0000 (12:22 +0100)
Removing pointer indirections to at least somewhat preserve test
intent. I wasn't aware this kind of directly co-recursive type
is even legal.

llvm/test/Linker/Inputs/pr22807-1.ll
llvm/test/Linker/Inputs/pr22807-2.ll
llvm/test/Linker/pr22807.ll

index 4081a9b..a1006bf 100644 (file)
@@ -1,4 +1,4 @@
-%struct.A = type { %struct.B* }
+%struct.A = type { %struct.B }
 %struct.B = type opaque
 
 define i32 @foo(%struct.A** %A) {
index 7739b77..137638e 100644 (file)
@@ -1,6 +1,6 @@
-%struct.A = type { %struct.B* }
+%struct.A = type { %struct.B }
 %struct.B = type opaque
 
-define i32 @bar(%struct.A* %A) {
+define i32 @bar(%struct.A %A) {
    ret i32 0
 }
index bb4ca2b..1db1eab 100644 (file)
@@ -1,13 +1,13 @@
 ; RUN: llvm-link -S -o - %p/pr22807.ll %p/Inputs/pr22807-1.ll %p/Inputs/pr22807-2.ll | FileCheck %s
 
 ; CHECK-NOT: type
-; CHECK: %struct.B = type { %struct.A* }
-; CHECK-NEXT: %struct.A = type { %struct.B* }
+; CHECK: %struct.B = type { %struct.A }
+; CHECK-NEXT: %struct.A = type { %struct.B }
 ; CHECK-NOT: type
 
-%struct.B = type { %struct.A* }
+%struct.B = type { %struct.A }
 %struct.A = type opaque
 
-define i32 @baz(%struct.B* %BB) {
+define i32 @baz(%struct.B %BB) {
   ret i32 0
 }