From: Nikita Popov Date: Wed, 14 Dec 2022 12:02:35 +0000 (+0100) Subject: [Linker] Convert test to opaque pointers (NFC) X-Git-Tag: upstream/17.0.6~23870 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11c7a753886ce46de52559929a2e05f036e0b16b;p=platform%2Fupstream%2Fllvm.git [Linker] Convert test to opaque pointers (NFC) To preserve test intent, remove a pointer indirection and use a GEP instead of bitcast, so the type is still mentioned. --- diff --git a/llvm/test/Linker/Inputs/pr21374.ll b/llvm/test/Linker/Inputs/pr21374.ll index fcddeaf..0b2a3b8 100644 --- a/llvm/test/Linker/Inputs/pr21374.ll +++ b/llvm/test/Linker/Inputs/pr21374.ll @@ -1,4 +1,4 @@ -%foo = type { i8* } -define void @g(%foo* %x) { +%foo = type { ptr } +define void @g(%foo %x) { ret void } diff --git a/llvm/test/Linker/pr21374.ll b/llvm/test/Linker/pr21374.ll index d777971..d97b718 100644 --- a/llvm/test/Linker/pr21374.ll +++ b/llvm/test/Linker/pr21374.ll @@ -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 }