[Linker] Convert test to opaque pointers (NFC)
authorNikita Popov <npopov@redhat.com>
Wed, 14 Dec 2022 12:02:35 +0000 (13:02 +0100)
committerNikita Popov <npopov@redhat.com>
Wed, 14 Dec 2022 12:03:08 +0000 (13:03 +0100)
To preserve test intent, remove a pointer indirection and use
a GEP instead of bitcast, so the type is still mentioned.

llvm/test/Linker/Inputs/pr21374.ll
llvm/test/Linker/pr21374.ll

index fcddeaf..0b2a3b8 100644 (file)
@@ -1,4 +1,4 @@
-%foo = type { i8* }
-define void @g(%foo* %x) {
+%foo = type { ptr }
+define void @g(%foo %x) {
   ret void
 }
index d777971..d97b718 100644 (file)
@@ -9,12 +9,12 @@
 
 ; Test that we get the same result with or without lazy loading.
 
-; CHECK: %foo = type { i8* }
-; CHECK-DAG: bitcast i32* null to %foo*
-; CHECK-DAG: define void @g(%foo* %x)
+; CHECK: %foo = type { ptr }
+; CHECK-DAG: getelementptr %foo, ptr null, i64 1
+; CHECK-DAG: define void @g(%foo %x)
 
-%foo = type { i8* }
+%foo = type { ptr }
 define void @f() {
-  bitcast i32* null to %foo*
+  getelementptr %foo, ptr null, i64 1
   ret void
 }