[llvm] f2e868c - [Linker] Convert some tests to opaque pointers (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 07:43:54 PST 2022
Author: Nikita Popov
Date: 2022-12-13T16:43:43+01:00
New Revision: f2e868c566107eb2f54e3e6033199297ba11e2d9
URL: https://github.com/llvm/llvm-project/commit/f2e868c566107eb2f54e3e6033199297ba11e2d9
DIFF: https://github.com/llvm/llvm-project/commit/f2e868c566107eb2f54e3e6033199297ba11e2d9.diff
LOG: [Linker] Convert some tests to opaque pointers (NFC)
Added:
Modified:
llvm/test/Linker/2002-07-17-GlobalFail.ll
llvm/test/Linker/2002-07-17-LinkTest2.ll
llvm/test/Linker/2002-08-20-ConstantExpr.ll
llvm/test/Linker/2003-04-26-NullPtrLinkProblem.ll
llvm/test/Linker/2003-05-15-TypeProblem.ll
llvm/test/Linker/2003-05-31-LinkerRename.ll
llvm/test/Linker/2003-06-02-TypeResolveProblem.ll
llvm/test/Linker/2003-06-02-TypeResolveProblem2.ll
llvm/test/Linker/2003-08-20-OpaqueTypeResolve.ll
llvm/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll
llvm/test/Linker/2003-08-28-TypeResolvesGlobal.ll
llvm/test/Linker/2003-08-28-TypeResolvesGlobal2.ll
llvm/test/Linker/2003-08-28-TypeResolvesGlobal3.ll
llvm/test/Linker/2004-02-17-WeakStrongLinkage.ll
llvm/test/Linker/2004-05-07-TypeResolution1.ll
llvm/test/Linker/2004-05-07-TypeResolution2.ll
llvm/test/Linker/2005-02-12-ConstantGlobals.ll
llvm/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
llvm/test/Linker/2006-01-19-ConstantPacked.ll
llvm/test/Linker/2008-03-05-AliasReference.ll
llvm/test/Linker/2009-09-03-mdnode.ll
llvm/test/Linker/2009-09-03-mdnode2.ll
llvm/test/Linker/2011-08-04-Metadata.ll
llvm/test/Linker/2011-08-04-Metadata2.ll
llvm/test/Linker/2011-08-18-unique-class-type.ll
llvm/test/Linker/2011-08-18-unique-class-type2.ll
llvm/test/Linker/AppendingLinkage2.ll
llvm/test/Linker/ConstantGlobals.ll
llvm/test/Linker/DbgDeclare.ll
llvm/test/Linker/DbgDeclare2.ll
llvm/test/Linker/Inputs/2003-05-31-LinkerRename.ll
llvm/test/Linker/Inputs/PR11464.a.ll
llvm/test/Linker/Inputs/PR11464.b.ll
llvm/test/Linker/Inputs/PR8300.a.ll
llvm/test/Linker/Inputs/PR8300.b.ll
llvm/test/Linker/Inputs/alias-threadlocal-defs.ll
llvm/test/Linker/Inputs/alias.ll
llvm/test/Linker/Inputs/appending-global.ll
llvm/test/Linker/Inputs/available_externally_over_decl.ll
llvm/test/Linker/Inputs/basiclink.a.ll
llvm/test/Linker/Inputs/basiclink.b.ll
llvm/test/Linker/Inputs/byref-type-input.ll
llvm/test/Linker/Inputs/byval-types-1.ll
llvm/test/Linker/Inputs/ctors.ll
llvm/test/Linker/Inputs/ctors2.ll
llvm/test/Linker/Inputs/ctors3.ll
llvm/test/Linker/Inputs/distinct.ll
llvm/test/Linker/Inputs/elementtype-struct-2.ll
llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
llvm/test/Linker/Inputs/funcimport_appending_global.ll
llvm/test/Linker/Inputs/globalorder-2.ll
llvm/test/Linker/Inputs/inalloca-type-input.ll
llvm/test/Linker/Inputs/linkage.b.ll
llvm/test/Linker/Inputs/linkage.d.ll
llvm/test/Linker/Inputs/metadata-attach.ll
llvm/test/Linker/Inputs/odr-lambda-2.ll
llvm/test/Linker/Inputs/only-needed-compiler-used.ll
llvm/test/Linker/Inputs/only-needed-ctors.ll
llvm/test/Linker/Inputs/only-needed-dtors.ll
llvm/test/Linker/Inputs/only-needed-named-metadata.ll
llvm/test/Linker/Inputs/only-needed-used.ll
llvm/test/Linker/Inputs/opaque.ll
llvm/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll
llvm/test/Linker/Inputs/sret-type-input.ll
llvm/test/Linker/Inputs/type-unique-alias.ll
llvm/test/Linker/Inputs/type-unique-dst-types2.ll
llvm/test/Linker/Inputs/type-unique-dst-types3.ll
llvm/test/Linker/Inputs/type-unique-inheritance-a.ll
llvm/test/Linker/Inputs/type-unique-inheritance-b.ll
llvm/test/Linker/Inputs/type-unique-simple2-a.ll
llvm/test/Linker/Inputs/type-unique-simple2-b.ll
llvm/test/Linker/Inputs/type-unique-unrelated2.ll
llvm/test/Linker/Inputs/type-unique-unrelated3.ll
llvm/test/Linker/Inputs/visibility.ll
llvm/test/Linker/LinkOnce.ll
llvm/test/Linker/addrspace.ll
llvm/test/Linker/alias-3.ll
llvm/test/Linker/alias-4.ll
llvm/test/Linker/alias.ll
llvm/test/Linker/appending-global-crash.ll
llvm/test/Linker/appending-global-err1.ll
llvm/test/Linker/appending-global-err2.ll
llvm/test/Linker/appending-global-err3.ll
llvm/test/Linker/appending-global-err4.ll
llvm/test/Linker/appending-global-err5.ll
llvm/test/Linker/appending-global-proto.ll
llvm/test/Linker/available_externally_over_decl.ll
llvm/test/Linker/blockaddress.ll
llvm/test/Linker/byref-types.ll
llvm/test/Linker/byval-types.ll
llvm/test/Linker/comdat-largest.ll
llvm/test/Linker/comdat-nonprevailing-decl.ll
llvm/test/Linker/comdat-refer-to-discarded.ll
llvm/test/Linker/comdat-rm-dst.ll
llvm/test/Linker/comdat-size-err.ll
llvm/test/Linker/comdat_group.ll
llvm/test/Linker/constructor-comdat.ll
llvm/test/Linker/ctors.ll
llvm/test/Linker/ctors4.ll
llvm/test/Linker/distinct.ll
llvm/test/Linker/elementtype-struct-1.ll
llvm/test/Linker/empty-swift.ll
llvm/test/Linker/func-attrs-a.ll
llvm/test/Linker/func-attrs-b.ll
llvm/test/Linker/funcimport_appending_global.ll
llvm/test/Linker/funcimport_comdat.ll
llvm/test/Linker/globalorder.ll
llvm/test/Linker/inalloca-types.ll
llvm/test/Linker/inlineasm.ll
llvm/test/Linker/link-flags.ll
llvm/test/Linker/link-global-to-func.ll
llvm/test/Linker/lto-attributes.ll
llvm/test/Linker/metadata-a.ll
llvm/test/Linker/metadata-attach.ll
llvm/test/Linker/metadata-b.ll
llvm/test/Linker/metadata-global.ll
llvm/test/Linker/metadata-with-global-value-operand.ll
llvm/test/Linker/null_mapping_constant.ll
llvm/test/Linker/odr-lambda-1.ll
llvm/test/Linker/only-needed-compiler-used.ll
llvm/test/Linker/only-needed-ctors1.ll
llvm/test/Linker/only-needed-ctors2.ll
llvm/test/Linker/only-needed-dtors1.ll
llvm/test/Linker/only-needed-dtors2.ll
llvm/test/Linker/only-needed-named-metadata.ll
llvm/test/Linker/only-needed-used.ll
llvm/test/Linker/opaque.ll
llvm/test/Linker/override-different-linkage.ll
llvm/test/Linker/override-with-internal-linkage-2.ll
llvm/test/Linker/override-with-internal-linkage.ll
llvm/test/Linker/override.ll
llvm/test/Linker/partial-type-refinement-link.ll
llvm/test/Linker/partial-type-refinement.ll
llvm/test/Linker/pr21494.ll
llvm/test/Linker/prologuedata.ll
llvm/test/Linker/replaced-function-matches-first-subprogram.ll
llvm/test/Linker/scalable-vector-type-construction.ll
llvm/test/Linker/sret-types.ll
llvm/test/Linker/type-unique-alias.ll
llvm/test/Linker/type-unique-dst-types.ll
llvm/test/Linker/type-unique-odr-a.ll
llvm/test/Linker/type-unique-odr-b.ll
llvm/test/Linker/type-unique-simple-a.ll
llvm/test/Linker/type-unique-simple-b.ll
llvm/test/Linker/type-unique-simple2-a.ll
llvm/test/Linker/type-unique-simple2-b.ll
llvm/test/Linker/type-unique-src-type.ll
llvm/test/Linker/type-unique-type-array-a.ll
llvm/test/Linker/type-unique-type-array-b.ll
llvm/test/Linker/type-unique-unrelated.ll
llvm/test/Linker/unnamed-addr1-a.ll
llvm/test/Linker/unnamed-addr1-b.ll
llvm/test/Linker/visibility.ll
llvm/test/Linker/weakextern.ll
Removed:
################################################################################
diff --git a/llvm/test/Linker/2002-07-17-GlobalFail.ll b/llvm/test/Linker/2002-07-17-GlobalFail.ll
index d3283106f6ecb..dcd1503f41196 100644
--- a/llvm/test/Linker/2002-07-17-GlobalFail.ll
+++ b/llvm/test/Linker/2002-07-17-GlobalFail.ll
@@ -2,7 +2,7 @@
; RUN: echo | llvm-as > %t.tmp.bc
; RUN: llvm-link %t.tmp.bc %t.bc
- at X = constant i32 5 ; <i32*> [#uses=2]
- at Y = internal global [2 x i32*] [ i32* @X, i32* @X ] ; <[2 x i32*]*> [#uses=0]
+ at X = constant i32 5 ; <ptr> [#uses=2]
+ at Y = internal global [2 x ptr] [ ptr @X, ptr @X ] ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/2002-07-17-LinkTest2.ll b/llvm/test/Linker/2002-07-17-LinkTest2.ll
index fa986f1572852..e17f984c5e45e 100644
--- a/llvm/test/Linker/2002-07-17-LinkTest2.ll
+++ b/llvm/test/Linker/2002-07-17-LinkTest2.ll
@@ -4,7 +4,7 @@
; RUN: llvm-as < %s > %t2.bc
; RUN: llvm-link %t1.bc %t2.bc
- at work = global i32 (i32, i32)* @zip ; <i32 (i32, i32)**> [#uses=0]
+ at work = global ptr @zip ; <ptr> [#uses=0]
declare i32 @zip(i32, i32)
diff --git a/llvm/test/Linker/2002-08-20-ConstantExpr.ll b/llvm/test/Linker/2002-08-20-ConstantExpr.ll
index f8217930678ab..1272bd1cbab77 100644
--- a/llvm/test/Linker/2002-08-20-ConstantExpr.ll
+++ b/llvm/test/Linker/2002-08-20-ConstantExpr.ll
@@ -4,6 +4,6 @@
; RUN: llvm-as < %s > %t.bc
; RUN: llvm-link %t.LinkTest.bc %t.bc
- at work = global i32 4 ; <i32*> [#uses=1]
- at test = global i32* getelementptr (i32, i32* @work, i64 1) ; <i32**> [#uses=0]
+ at work = global i32 4 ; <ptr> [#uses=1]
+ at test = global ptr getelementptr (i32, ptr @work, i64 1) ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/2003-04-26-NullPtrLinkProblem.ll b/llvm/test/Linker/2003-04-26-NullPtrLinkProblem.ll
index 5e8249b047577..69f091632dbab 100644
--- a/llvm/test/Linker/2003-04-26-NullPtrLinkProblem.ll
+++ b/llvm/test/Linker/2003-04-26-NullPtrLinkProblem.ll
@@ -7,11 +7,11 @@
%T = type opaque
-declare %T* @create()
+declare ptr @create()
define void @test() {
- %X = call %T* @create( ) ; <%T*> [#uses=1]
- %v = icmp eq %T* %X, null ; <i1> [#uses=0]
+ %X = call ptr @create( ) ; <ptr> [#uses=1]
+ %v = icmp eq ptr %X, null ; <i1> [#uses=0]
ret void
}
diff --git a/llvm/test/Linker/2003-05-15-TypeProblem.ll b/llvm/test/Linker/2003-05-15-TypeProblem.ll
index c1fe334d151a0..c1a3f18c21b3d 100644
--- a/llvm/test/Linker/2003-05-15-TypeProblem.ll
+++ b/llvm/test/Linker/2003-05-15-TypeProblem.ll
@@ -1,10 +1,10 @@
; This one fails because the LLVM runtime is allowing two null pointers of
; the same type to be created!
-; RUN: echo "%M = type { %N*} %N = type opaque" | llvm-as > %t.2.bc
+; RUN: echo "%M = type { ptr} %N = type opaque" | llvm-as > %t.2.bc
; RUN: llvm-as < %s > %t.1.bc
; RUN: llvm-link %t.1.bc %t.2.bc
-%M = type { i32* }
+%M = type { ptr }
%N = type i32
diff --git a/llvm/test/Linker/2003-05-31-LinkerRename.ll b/llvm/test/Linker/2003-05-31-LinkerRename.ll
index f511be1bf22f1..7ad2eb0bcce1e 100644
--- a/llvm/test/Linker/2003-05-31-LinkerRename.ll
+++ b/llvm/test/Linker/2003-05-31-LinkerRename.ll
@@ -1,6 +1,6 @@
; RUN: llvm-link %S/Inputs/2003-05-31-LinkerRename.ll %s -S | FileCheck %s
-; CHECK: @bar = global i32 ()* @foo.2
+; CHECK: @bar = global ptr @foo.2
; CHECK: define internal i32 @foo.2() {
; CHECK-NEXT: ret i32 7
diff --git a/llvm/test/Linker/2003-06-02-TypeResolveProblem.ll b/llvm/test/Linker/2003-06-02-TypeResolveProblem.ll
index fa24b6dbfb87b..785182b9934f9 100644
--- a/llvm/test/Linker/2003-06-02-TypeResolveProblem.ll
+++ b/llvm/test/Linker/2003-06-02-TypeResolveProblem.ll
@@ -3,5 +3,5 @@
; RUN: llvm-link %t.1.bc %t.2.bc
%T = type opaque
- at a = constant { %T* } zeroinitializer ; <{ %T* }*> [#uses=0]
+ at a = constant { ptr } zeroinitializer ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/2003-06-02-TypeResolveProblem2.ll b/llvm/test/Linker/2003-06-02-TypeResolveProblem2.ll
index 3ae23a2080420..34811ac479646 100644
--- a/llvm/test/Linker/2003-06-02-TypeResolveProblem2.ll
+++ b/llvm/test/Linker/2003-06-02-TypeResolveProblem2.ll
@@ -3,5 +3,5 @@
; RUN: llvm-link %t.1.bc %t.2.bc
%T = type opaque
- at X = constant { %T* } zeroinitializer ; <{ %T* }*> [#uses=0]
+ at X = constant { ptr } zeroinitializer ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/2003-08-20-OpaqueTypeResolve.ll b/llvm/test/Linker/2003-08-20-OpaqueTypeResolve.ll
index 175146f12212d..dcf26dff04b2b 100644
--- a/llvm/test/Linker/2003-08-20-OpaqueTypeResolve.ll
+++ b/llvm/test/Linker/2003-08-20-OpaqueTypeResolve.ll
@@ -1,8 +1,8 @@
; RUN: llvm-as < %s > %t.out1.bc
-; RUN: echo "%M = type { i32, i32* } " | llvm-as > %t.out2.bc
+; RUN: echo "%M = type { i32, ptr } " | llvm-as > %t.out2.bc
; RUN: llvm-link %t.out1.bc %t.out2.bc
-%M = type { i32, %N* }
+%M = type { i32, ptr }
%N = type opaque
-;%X = global { int, %N* } { int 5, %N* null }
+;%X = global { int, ptr } { int 5, ptr null }
diff --git a/llvm/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll b/llvm/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll
index d810dba6589f2..ca95f71db194d 100644
--- a/llvm/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll
+++ b/llvm/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll
@@ -2,9 +2,9 @@
; net.
; RUN: llvm-as < %s > %t.out1.bc
-; RUN: echo "%M = type { %M*, i32* }" | llvm-as > %t.out2.bc
+; RUN: echo "%M = type { ptr, ptr }" | llvm-as > %t.out2.bc
; RUN: llvm-link %t.out1.bc %t.out2.bc
%T1 = type opaque
-%M = type { %M*, %T1* }
+%M = type { ptr, ptr }
diff --git a/llvm/test/Linker/2003-08-28-TypeResolvesGlobal.ll b/llvm/test/Linker/2003-08-28-TypeResolvesGlobal.ll
index 53ae5819ae176..e926fae5a0e0b 100644
--- a/llvm/test/Linker/2003-08-28-TypeResolvesGlobal.ll
+++ b/llvm/test/Linker/2003-08-28-TypeResolvesGlobal.ll
@@ -4,9 +4,9 @@
%M = type opaque
-define void @foo(i32* %V) {
+define void @foo(ptr %V) {
ret void
}
-declare void @foo.upgrd.1(%M*)
+declare void @foo.upgrd.1(ptr)
diff --git a/llvm/test/Linker/2003-08-28-TypeResolvesGlobal2.ll b/llvm/test/Linker/2003-08-28-TypeResolvesGlobal2.ll
index 601b917210d58..af7d7c723bcb7 100644
--- a/llvm/test/Linker/2003-08-28-TypeResolvesGlobal2.ll
+++ b/llvm/test/Linker/2003-08-28-TypeResolvesGlobal2.ll
@@ -4,15 +4,15 @@
%M = type opaque
-define void @foo(i32* %V) {
+define void @foo(ptr %V) {
ret void
}
-declare void @foo.upgrd.1(%M*)
+declare void @foo.upgrd.1(ptr)
define void @other() {
- call void @foo.upgrd.1( %M* null )
- call void @foo( i32* null )
+ call void @foo.upgrd.1( ptr null )
+ call void @foo( ptr null )
ret void
}
diff --git a/llvm/test/Linker/2003-08-28-TypeResolvesGlobal3.ll b/llvm/test/Linker/2003-08-28-TypeResolvesGlobal3.ll
index 1ed6f3c1dc26f..4d2eb70190678 100644
--- a/llvm/test/Linker/2003-08-28-TypeResolvesGlobal3.ll
+++ b/llvm/test/Linker/2003-08-28-TypeResolvesGlobal3.ll
@@ -5,11 +5,11 @@
%M = type opaque
; GLobal using the resolved function prototype
- at 0 = global void (%M*)* @foo ; <void (%M*)**>:0 [#uses=0]
+ at 0 = global ptr @foo ; <ptr>:0 [#uses=0]
-define void @foo.upgrd.1(i32* %V) {
+define void @foo.upgrd.1(ptr %V) {
ret void
}
-declare void @foo(%M*)
+declare void @foo(ptr)
diff --git a/llvm/test/Linker/2004-02-17-WeakStrongLinkage.ll b/llvm/test/Linker/2004-02-17-WeakStrongLinkage.ll
index 224463949d356..6fe8abc12b0dc 100644
--- a/llvm/test/Linker/2004-02-17-WeakStrongLinkage.ll
+++ b/llvm/test/Linker/2004-02-17-WeakStrongLinkage.ll
@@ -1,7 +1,7 @@
; RUN: llvm-as < %s > %t.out2.bc
-; RUN: echo "@me = global i32* null" | llvm-as > %t.out1.bc
+; RUN: echo "@me = global ptr null" | llvm-as > %t.out1.bc
; RUN: llvm-link %t.out1.bc %t.out2.bc -o /dev/null
- at me = weak global i32* null ; <i32**> [#uses=0]
+ at me = weak global ptr null ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/2004-05-07-TypeResolution1.ll b/llvm/test/Linker/2004-05-07-TypeResolution1.ll
index b8ce2d9baedb5..524701fe9989f 100644
--- a/llvm/test/Linker/2004-05-07-TypeResolution1.ll
+++ b/llvm/test/Linker/2004-05-07-TypeResolution1.ll
@@ -4,32 +4,32 @@
target datalayout = "e-p:32:32"
%myint = type opaque
- %struct1 = type { i32, void (%struct2*)*, %myint*, i32 (i32*)* }
+ %struct1 = type { i32, ptr, ptr, ptr }
%struct2 = type { %struct1 }
- at driver1 = global %struct1 zeroinitializer ; <%struct1*> [#uses=1]
- at m1 = external global [1 x i8]* ; <[1 x i8]**> [#uses=0]
- at str1 = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=0]
- at str2 = constant [2 x i8] zeroinitializer ; <[2 x i8]*> [#uses=0]
- at str3 = constant [3 x i8] zeroinitializer ; <[3 x i8]*> [#uses=0]
- at str4 = constant [4 x i8] zeroinitializer ; <[4 x i8]*> [#uses=0]
- at str5 = constant [5 x i8] zeroinitializer ; <[5 x i8]*> [#uses=0]
- at str6 = constant [6 x i8] zeroinitializer ; <[6 x i8]*> [#uses=0]
- at str7 = constant [7 x i8] zeroinitializer ; <[7 x i8]*> [#uses=0]
- at str8 = constant [8 x i8] zeroinitializer ; <[8 x i8]*> [#uses=0]
- at str9 = constant [9 x i8] zeroinitializer ; <[9 x i8]*> [#uses=0]
- at stra = constant [10 x i8] zeroinitializer ; <[10 x i8]*> [#uses=0]
- at strb = constant [11 x i8] zeroinitializer ; <[11 x i8]*> [#uses=0]
- at strc = constant [12 x i8] zeroinitializer ; <[12 x i8]*> [#uses=0]
- at strd = constant [13 x i8] zeroinitializer ; <[13 x i8]*> [#uses=0]
- at stre = constant [14 x i8] zeroinitializer ; <[14 x i8]*> [#uses=0]
- at strf = constant [15 x i8] zeroinitializer ; <[15 x i8]*> [#uses=0]
- at strg = constant [16 x i8] zeroinitializer ; <[16 x i8]*> [#uses=0]
- at strh = constant [17 x i8] zeroinitializer ; <[17 x i8]*> [#uses=0]
+ at driver1 = global %struct1 zeroinitializer ; <ptr> [#uses=1]
+ at m1 = external global ptr ; <ptr> [#uses=0]
+ at str1 = constant [1 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at str2 = constant [2 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at str3 = constant [3 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at str4 = constant [4 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at str5 = constant [5 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at str6 = constant [6 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at str7 = constant [7 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at str8 = constant [8 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at str9 = constant [9 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at stra = constant [10 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at strb = constant [11 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at strc = constant [12 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at strd = constant [13 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at stre = constant [14 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at strf = constant [15 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at strg = constant [16 x i8] zeroinitializer ; <ptr> [#uses=0]
+ at strh = constant [17 x i8] zeroinitializer ; <ptr> [#uses=0]
-declare void @func(%struct2*)
+declare void @func(ptr)
define void @tty_init() {
entry:
- store volatile void (%struct2*)* @func, void (%struct2*)** getelementptr (%struct1, %struct1* @driver1, i64 0, i32 1)
+ store volatile ptr @func, ptr getelementptr (%struct1, ptr @driver1, i64 0, i32 1)
ret void
}
diff --git a/llvm/test/Linker/2004-05-07-TypeResolution2.ll b/llvm/test/Linker/2004-05-07-TypeResolution2.ll
index 2b672761458de..44fbc3b1f2148 100644
--- a/llvm/test/Linker/2004-05-07-TypeResolution2.ll
+++ b/llvm/test/Linker/2004-05-07-TypeResolution2.ll
@@ -3,13 +3,13 @@
; RUN: echo
target datalayout = "e-p:32:32"
%myint = type i16
- %struct1 = type { i32, void (%struct2*)*, i16*, i32 (i32*)* }
+ %struct1 = type { i32, ptr, ptr, ptr }
%struct2 = type { %struct1 }
-define internal void @f1(%struct1* %tty) {
+define internal void @f1(ptr %tty) {
loopentry.preheader:
- %tmp.2.i.i = getelementptr %struct1, %struct1* %tty, i64 0, i32 1 ; <void (%struct2*)**> [#uses=1]
- %tmp.3.i.i = load volatile void (%struct2*)*, void (%struct2*)** %tmp.2.i.i ; <void (%struct2*)*> [#uses=0]
+ %tmp.2.i.i = getelementptr %struct1, ptr %tty, i64 0, i32 1 ; <ptr> [#uses=1]
+ %tmp.3.i.i = load volatile ptr, ptr %tmp.2.i.i ; <ptr> [#uses=0]
ret void
}
diff --git a/llvm/test/Linker/2005-02-12-ConstantGlobals.ll b/llvm/test/Linker/2005-02-12-ConstantGlobals.ll
index db990604d9a8f..c1b2bbb2dde62 100644
--- a/llvm/test/Linker/2005-02-12-ConstantGlobals.ll
+++ b/llvm/test/Linker/2005-02-12-ConstantGlobals.ll
@@ -6,4 +6,4 @@
; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
; CHECK: global i32 7
- at X = external constant i32 ; <i32*> [#uses=0]
+ at X = external constant i32 ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll b/llvm/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
index b99b3a823755c..8e3901a532e75 100644
--- a/llvm/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
+++ b/llvm/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
@@ -7,5 +7,5 @@
; When linked, the globals should be merged, and the result should still
; be named '@G'.
- at G = appending global [1 x i32] zeroinitializer ; <[1 x i32]*> [#uses=0]
+ at G = appending global [1 x i32] zeroinitializer ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/2006-01-19-ConstantPacked.ll b/llvm/test/Linker/2006-01-19-ConstantPacked.ll
index 5b39cb2ad2791..e276661930cbe 100644
--- a/llvm/test/Linker/2006-01-19-ConstantPacked.ll
+++ b/llvm/test/Linker/2006-01-19-ConstantPacked.ll
@@ -3,7 +3,7 @@
target datalayout = "E-p:32:32"
target triple = "powerpc-apple-darwin7.7.0"
- at source = global <4 x i32> < i32 0, i32 1, i32 2, i32 3 > ; <<4 x i32>*> [#uses=0]
+ at source = global <4 x i32> < i32 0, i32 1, i32 2, i32 3 > ; <ptr> [#uses=0]
define i32 @main() {
ret i32 0
diff --git a/llvm/test/Linker/2008-03-05-AliasReference.ll b/llvm/test/Linker/2008-03-05-AliasReference.ll
index 1423049c81724..27ac262aa0481 100644
--- a/llvm/test/Linker/2008-03-05-AliasReference.ll
+++ b/llvm/test/Linker/2008-03-05-AliasReference.ll
@@ -6,12 +6,12 @@
; ModuleID = 'bug.o'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-unknown-linux-gnu"
- at foo = weak global i32 0 ; <i32*> [#uses=1]
+ at foo = weak global i32 0 ; <ptr> [#uses=1]
- at bar = weak alias i32, i32* @foo ; <i32*> [#uses=1]
+ at bar = weak alias i32, ptr @foo ; <ptr> [#uses=1]
define i32 @baz() nounwind {
entry:
- %tmp1 = load i32, i32* @bar, align 4 ; <i32> [#uses=1]
+ %tmp1 = load i32, ptr @bar, align 4 ; <i32> [#uses=1]
ret i32 %tmp1
}
diff --git a/llvm/test/Linker/2009-09-03-mdnode.ll b/llvm/test/Linker/2009-09-03-mdnode.ll
index 7f3324a66451f..5bd7eaf15fd98 100644
--- a/llvm/test/Linker/2009-09-03-mdnode.ll
+++ b/llvm/test/Linker/2009-09-03-mdnode.ll
@@ -6,15 +6,15 @@ declare void @f() nounwind
define i32 @main(...) nounwind {
entry:
- %retval = alloca i32 ; <i32*> [#uses=2]
+ %retval = alloca i32 ; <ptr> [#uses=2]
call void @llvm.dbg.func.start(metadata !0)
- store i32 0, i32* %retval
+ store i32 0, ptr %retval
call void @llvm.dbg.stoppoint(i32 4, i32 5, metadata !1)
call void @f()
br label %return
return: ; preds = %entry
- %0 = load i32, i32* %retval ; <i32> [#uses=1]
+ %0 = load i32, ptr %retval ; <i32> [#uses=1]
call void @llvm.dbg.stoppoint(i32 5, i32 1, metadata !1)
call void @llvm.dbg.region.end(metadata !0)
ret i32 %0
diff --git a/llvm/test/Linker/2009-09-03-mdnode2.ll b/llvm/test/Linker/2009-09-03-mdnode2.ll
index 0b96f05664671..1abed16885f01 100644
--- a/llvm/test/Linker/2009-09-03-mdnode2.ll
+++ b/llvm/test/Linker/2009-09-03-mdnode2.ll
@@ -4,12 +4,12 @@
define i32 @f(...) nounwind {
entry:
- %retval = alloca i32 ; <i32*> [#uses=1]
+ %retval = alloca i32 ; <ptr> [#uses=1]
call void @llvm.dbg.func.start(metadata !0)
br label %return
return: ; preds = %entry
- %0 = load i32, i32* %retval ; <i32> [#uses=1]
+ %0 = load i32, ptr %retval ; <i32> [#uses=1]
call void @llvm.dbg.stoppoint(i32 3, i32 1, metadata !1)
call void @llvm.dbg.region.end(metadata !0)
ret i32 %0
diff --git a/llvm/test/Linker/2011-08-04-Metadata.ll b/llvm/test/Linker/2011-08-04-Metadata.ll
index d2dc61b9bfdff..6a5e5c7150e4b 100644
--- a/llvm/test/Linker/2011-08-04-Metadata.ll
+++ b/llvm/test/Linker/2011-08-04-Metadata.ll
@@ -20,7 +20,7 @@ target triple = "x86_64-apple-macosx10.7.0"
; Function Attrs: nounwind ssp uwtable
define void @foo() #0 !dbg !8 {
entry:
- store i32 1, i32* @x, align 4, !dbg !11
+ store i32 1, ptr @x, align 4, !dbg !11
ret void, !dbg !11
}
diff --git a/llvm/test/Linker/2011-08-04-Metadata2.ll b/llvm/test/Linker/2011-08-04-Metadata2.ll
index 21b0eba4be7e6..707a0fd8ca76f 100644
--- a/llvm/test/Linker/2011-08-04-Metadata2.ll
+++ b/llvm/test/Linker/2011-08-04-Metadata2.ll
@@ -11,7 +11,7 @@ target triple = "x86_64-apple-macosx10.7.0"
; Function Attrs: nounwind ssp uwtable
define void @bar() #0 !dbg !8 {
entry:
- store i32 1, i32* @x, align 4, !dbg !11
+ store i32 1, ptr @x, align 4, !dbg !11
ret void, !dbg !11
}
diff --git a/llvm/test/Linker/2011-08-18-unique-class-type.ll b/llvm/test/Linker/2011-08-18-unique-class-type.ll
index 1e9b40ff7ab76..f9006e0976b69 100644
--- a/llvm/test/Linker/2011-08-18-unique-class-type.ll
+++ b/llvm/test/Linker/2011-08-18-unique-class-type.ll
@@ -11,7 +11,7 @@ target triple = "x86_64-apple-macosx10.7.0"
define void @_Z3fooN2N11AE() nounwind uwtable ssp !dbg !5 {
entry:
%mya = alloca %"class.N1::A", align 1
- call void @llvm.dbg.declare(metadata %"class.N1::A"* %mya, metadata !9, metadata !DIExpression()), !dbg !13
+ call void @llvm.dbg.declare(metadata ptr %mya, metadata !9, metadata !DIExpression()), !dbg !13
ret void, !dbg !14
}
diff --git a/llvm/test/Linker/2011-08-18-unique-class-type2.ll b/llvm/test/Linker/2011-08-18-unique-class-type2.ll
index 439ddae05acff..7ba1e866371ca 100644
--- a/llvm/test/Linker/2011-08-18-unique-class-type2.ll
+++ b/llvm/test/Linker/2011-08-18-unique-class-type2.ll
@@ -9,7 +9,7 @@ target triple = "x86_64-apple-macosx10.7.0"
define void @_Z3barN2N11AE() nounwind uwtable ssp !dbg !5 {
entry:
%youra = alloca %"class.N1::A", align 1
- call void @llvm.dbg.declare(metadata %"class.N1::A"* %youra, metadata !9, metadata !DIExpression()), !dbg !13
+ call void @llvm.dbg.declare(metadata ptr %youra, metadata !9, metadata !DIExpression()), !dbg !13
ret void, !dbg !14
}
diff --git a/llvm/test/Linker/AppendingLinkage2.ll b/llvm/test/Linker/AppendingLinkage2.ll
index 341ca1606b811..5d8f560c60919 100644
--- a/llvm/test/Linker/AppendingLinkage2.ll
+++ b/llvm/test/Linker/AppendingLinkage2.ll
@@ -6,4 +6,4 @@
; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
; CHECK: [i32 7, i32 8]
- at X = appending global [1 x i32] [ i32 7 ] ; <[1 x i32]*> [#uses=0]
+ at X = appending global [1 x i32] [ i32 7 ] ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/ConstantGlobals.ll b/llvm/test/Linker/ConstantGlobals.ll
index 58c0d711a07eb..9836d8ae4b513 100644
--- a/llvm/test/Linker/ConstantGlobals.ll
+++ b/llvm/test/Linker/ConstantGlobals.ll
@@ -7,6 +7,6 @@
; CHECK-DAG: @Y = external global [1 x i32]
@Y = external global [1 x i32]
-define [1 x i32]* @use-Y() {
- ret [1 x i32] *@Y
+define ptr @use-Y() {
+ ret ptr @Y
}
diff --git a/llvm/test/Linker/DbgDeclare.ll b/llvm/test/Linker/DbgDeclare.ll
index 3e2e3b3dfb9f6..5ca04c892f830 100644
--- a/llvm/test/Linker/DbgDeclare.ll
+++ b/llvm/test/Linker/DbgDeclare.ll
@@ -3,36 +3,36 @@
; Test if metadata in dbg.declare is mapped properly or not.
; rdar://13089880
-; CHECK: define i32 @main(i32 %argc, i8** %argv)
-; CHECK: call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !{{[0-9]+}}, metadata {{.*}})
-; CHECK: call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !{{[0-9]+}}, metadata {{.*}})
-; CHECK: define void @test(i32 %argc, i8** %argv)
-; CHECK: call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !{{[0-9]+}}, metadata {{.*}})
-; CHECK: call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !{{[0-9]+}}, metadata {{.*}})
-; CHECK: call void @llvm.dbg.declare(metadata i32* %i, metadata !{{[0-9]+}}, metadata {{.*}})
+; CHECK: define i32 @main(i32 %argc, ptr %argv)
+; CHECK: call void @llvm.dbg.declare(metadata ptr %argc.addr, metadata !{{[0-9]+}}, metadata {{.*}})
+; CHECK: call void @llvm.dbg.declare(metadata ptr %argv.addr, metadata !{{[0-9]+}}, metadata {{.*}})
+; CHECK: define void @test(i32 %argc, ptr %argv)
+; CHECK: call void @llvm.dbg.declare(metadata ptr %argc.addr, metadata !{{[0-9]+}}, metadata {{.*}})
+; CHECK: call void @llvm.dbg.declare(metadata ptr %argv.addr, metadata !{{[0-9]+}}, metadata {{.*}})
+; CHECK: call void @llvm.dbg.declare(metadata ptr %i, metadata !{{[0-9]+}}, metadata {{.*}})
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
-define i32 @main(i32 %argc, i8** %argv) uwtable ssp !dbg !5 {
+define i32 @main(i32 %argc, ptr %argv) uwtable ssp !dbg !5 {
entry:
%retval = alloca i32, align 4
%argc.addr = alloca i32, align 4
- %argv.addr = alloca i8**, align 8
- store i32 0, i32* %retval
- store i32 %argc, i32* %argc.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !14, metadata !DIExpression()), !dbg !15
- store i8** %argv, i8*** %argv.addr, align 8
- call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !16, metadata !DIExpression()), !dbg !15
- %0 = load i32, i32* %argc.addr, align 4, !dbg !17
- %1 = load i8**, i8*** %argv.addr, align 8, !dbg !17
- call void @test(i32 %0, i8** %1), !dbg !17
+ %argv.addr = alloca ptr, align 8
+ store i32 0, ptr %retval
+ store i32 %argc, ptr %argc.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %argc.addr, metadata !14, metadata !DIExpression()), !dbg !15
+ store ptr %argv, ptr %argv.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %argv.addr, metadata !16, metadata !DIExpression()), !dbg !15
+ %0 = load i32, ptr %argc.addr, align 4, !dbg !17
+ %1 = load ptr, ptr %argv.addr, align 8, !dbg !17
+ call void @test(i32 %0, ptr %1), !dbg !17
ret i32 0, !dbg !19
}
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
-declare void @test(i32, i8**)
+declare void @test(i32, ptr)
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!21}
diff --git a/llvm/test/Linker/DbgDeclare2.ll b/llvm/test/Linker/DbgDeclare2.ll
index 106259b2789a9..71153f312bd70 100644
--- a/llvm/test/Linker/DbgDeclare2.ll
+++ b/llvm/test/Linker/DbgDeclare2.ll
@@ -5,38 +5,38 @@
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
-define void @test(i32 %argc, i8** %argv) uwtable ssp !dbg !5 {
+define void @test(i32 %argc, ptr %argv) uwtable ssp !dbg !5 {
entry:
%argc.addr = alloca i32, align 4
- %argv.addr = alloca i8**, align 8
+ %argv.addr = alloca ptr, align 8
%i = alloca i32, align 4
- store i32 %argc, i32* %argc.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !14, metadata !DIExpression()), !dbg !15
- store i8** %argv, i8*** %argv.addr, align 8
- call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !16, metadata !DIExpression()), !dbg !15
- call void @llvm.dbg.declare(metadata i32* %i, metadata !17, metadata !DIExpression()), !dbg !20
- store i32 0, i32* %i, align 4, !dbg !20
+ store i32 %argc, ptr %argc.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %argc.addr, metadata !14, metadata !DIExpression()), !dbg !15
+ store ptr %argv, ptr %argv.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %argv.addr, metadata !16, metadata !DIExpression()), !dbg !15
+ call void @llvm.dbg.declare(metadata ptr %i, metadata !17, metadata !DIExpression()), !dbg !20
+ store i32 0, ptr %i, align 4, !dbg !20
br label %for.cond, !dbg !20
for.cond: ; preds = %for.inc, %entry
- %0 = load i32, i32* %i, align 4, !dbg !20
- %1 = load i32, i32* %argc.addr, align 4, !dbg !20
+ %0 = load i32, ptr %i, align 4, !dbg !20
+ %1 = load i32, ptr %argc.addr, align 4, !dbg !20
%cmp = icmp slt i32 %0, %1, !dbg !20
br i1 %cmp, label %for.body, label %for.end, !dbg !20
for.body: ; preds = %for.cond
- %2 = load i32, i32* %i, align 4, !dbg !21
+ %2 = load i32, ptr %i, align 4, !dbg !21
%idxprom = sext i32 %2 to i64, !dbg !21
- %3 = load i8**, i8*** %argv.addr, align 8, !dbg !21
- %arrayidx = getelementptr inbounds i8*, i8** %3, i64 %idxprom, !dbg !21
- %4 = load i8*, i8** %arrayidx, align 8, !dbg !21
- %call = call i32 @puts(i8* %4), !dbg !21
+ %3 = load ptr, ptr %argv.addr, align 8, !dbg !21
+ %arrayidx = getelementptr inbounds ptr, ptr %3, i64 %idxprom, !dbg !21
+ %4 = load ptr, ptr %arrayidx, align 8, !dbg !21
+ %call = call i32 @puts(ptr %4), !dbg !21
br label %for.inc, !dbg !23
for.inc: ; preds = %for.body
- %5 = load i32, i32* %i, align 4, !dbg !20
+ %5 = load i32, ptr %i, align 4, !dbg !20
%inc = add nsw i32 %5, 1, !dbg !20
- store i32 %inc, i32* %i, align 4, !dbg !20
+ store i32 %inc, ptr %i, align 4, !dbg !20
br label %for.cond, !dbg !20
for.end: ; preds = %for.cond
@@ -45,7 +45,7 @@ for.end: ; preds = %for.cond
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
-declare i32 @puts(i8*)
+declare i32 @puts(ptr)
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!27}
diff --git a/llvm/test/Linker/Inputs/2003-05-31-LinkerRename.ll b/llvm/test/Linker/Inputs/2003-05-31-LinkerRename.ll
index dcd0bf5d2172e..daaefcf4bb37f 100644
--- a/llvm/test/Linker/Inputs/2003-05-31-LinkerRename.ll
+++ b/llvm/test/Linker/Inputs/2003-05-31-LinkerRename.ll
@@ -1,4 +1,4 @@
- at bar = global i32()* @foo
+ at bar = global ptr @foo
define internal i32 @foo() {
ret i32 7
diff --git a/llvm/test/Linker/Inputs/PR11464.a.ll b/llvm/test/Linker/Inputs/PR11464.a.ll
index 25a93500dedaf..d4f199b869fe0 100644
--- a/llvm/test/Linker/Inputs/PR11464.a.ll
+++ b/llvm/test/Linker/Inputs/PR11464.a.ll
@@ -1,3 +1,3 @@
%bug_type = type opaque
-declare i32 @bug_a(%bug_type*)
-declare i32 @bug_b(%bug_type*)
+declare i32 @bug_a(ptr)
+declare i32 @bug_b(ptr)
diff --git a/llvm/test/Linker/Inputs/PR11464.b.ll b/llvm/test/Linker/Inputs/PR11464.b.ll
index 2c74d9c4c3bcb..c9a5ac28954cf 100644
--- a/llvm/test/Linker/Inputs/PR11464.b.ll
+++ b/llvm/test/Linker/Inputs/PR11464.b.ll
@@ -1,13 +1,12 @@
-%bug_type = type { %bug_type* }
+%bug_type = type { ptr }
%bar = type { i32 }
-define i32 @bug_a(%bug_type* %fp) nounwind uwtable {
+define i32 @bug_a(ptr %fp) nounwind uwtable {
entry:
- %d_stream = getelementptr inbounds %bug_type, %bug_type* %fp, i64 0, i32 0
ret i32 0
}
-define i32 @bug_b(%bar* %a) nounwind uwtable {
+define i32 @bug_b(ptr %a) nounwind uwtable {
entry:
ret i32 0
}
diff --git a/llvm/test/Linker/Inputs/PR8300.a.ll b/llvm/test/Linker/Inputs/PR8300.a.ll
index c705db3fd00c0..d1307fb096aaa 100644
--- a/llvm/test/Linker/Inputs/PR8300.a.ll
+++ b/llvm/test/Linker/Inputs/PR8300.a.ll
@@ -1,2 +1,2 @@
%foo2 = type { [8 x i8] }
-declare void @zed(%foo2*)
+declare void @zed(%foo2)
diff --git a/llvm/test/Linker/Inputs/PR8300.b.ll b/llvm/test/Linker/Inputs/PR8300.b.ll
index ce17f5f0dbe15..f2b89c8eb54c9 100644
--- a/llvm/test/Linker/Inputs/PR8300.b.ll
+++ b/llvm/test/Linker/Inputs/PR8300.b.ll
@@ -1,9 +1,9 @@
%foo = type { [8 x i8] }
%bar = type { [9 x i8] }
- at zed = alias void (%foo*), bitcast (void (%bar*)* @xyz to void (%foo*)*)
+ at zed = alias void (%bar), ptr @xyz
-define void @xyz(%bar* %this) {
+define void @xyz(%foo %this) {
entry:
ret void
}
diff --git a/llvm/test/Linker/Inputs/alias-threadlocal-defs.ll b/llvm/test/Linker/Inputs/alias-threadlocal-defs.ll
index 7b7062cc3cd1c..0aa146c9c1789 100644
--- a/llvm/test/Linker/Inputs/alias-threadlocal-defs.ll
+++ b/llvm/test/Linker/Inputs/alias-threadlocal-defs.ll
@@ -1,2 +1,2 @@
@tlsvar1 = thread_local global i32 0, align 4
- at tlsvar2 = hidden thread_local alias i32, i32* @tlsvar1
+ at tlsvar2 = hidden thread_local alias i32, ptr @tlsvar1
diff --git a/llvm/test/Linker/Inputs/alias.ll b/llvm/test/Linker/Inputs/alias.ll
index d4a734f582511..1836f1ec0de9d 100644
--- a/llvm/test/Linker/Inputs/alias.ll
+++ b/llvm/test/Linker/Inputs/alias.ll
@@ -1,3 +1,3 @@
@zed = global i32 42
- at foo = alias i32, i32* @zed
- at foo2 = alias i16, bitcast (i32* @zed to i16*)
+ at foo = alias i32, ptr @zed
+ at foo2 = alias i16, ptr @zed
diff --git a/llvm/test/Linker/Inputs/appending-global.ll b/llvm/test/Linker/Inputs/appending-global.ll
index bd95c41e178d7..3b000f82901ad 100644
--- a/llvm/test/Linker/Inputs/appending-global.ll
+++ b/llvm/test/Linker/Inputs/appending-global.ll
@@ -1 +1 @@
- at var = appending global [1 x i8* ] undef
+ at var = appending global [1 x ptr] undef
diff --git a/llvm/test/Linker/Inputs/available_externally_over_decl.ll b/llvm/test/Linker/Inputs/available_externally_over_decl.ll
index 6bd0a939957be..2ae9e40f4cadc 100644
--- a/llvm/test/Linker/Inputs/available_externally_over_decl.ll
+++ b/llvm/test/Linker/Inputs/available_externally_over_decl.ll
@@ -1,5 +1,5 @@
- at h = global void ()* @f
- at h2 = global void ()* @g
+ at h = global ptr @f
+ at h2 = global ptr @g
define available_externally void @f() {
ret void
diff --git a/llvm/test/Linker/Inputs/basiclink.a.ll b/llvm/test/Linker/Inputs/basiclink.a.ll
index 997932d4fa76a..edaaced070b68 100644
--- a/llvm/test/Linker/Inputs/basiclink.a.ll
+++ b/llvm/test/Linker/Inputs/basiclink.a.ll
@@ -1,2 +1,2 @@
-define i32* @foo(i32 %x) { ret i32* @baz }
+define ptr @foo(i32 %x) { ret ptr @baz }
@baz = external global i32
diff --git a/llvm/test/Linker/Inputs/basiclink.b.ll b/llvm/test/Linker/Inputs/basiclink.b.ll
index 407aa944837a3..fcbc41f367c81 100644
--- a/llvm/test/Linker/Inputs/basiclink.b.ll
+++ b/llvm/test/Linker/Inputs/basiclink.b.ll
@@ -1,6 +1,6 @@
-declare i32* @foo(...)
-define i32* @bar() {
- %ret = call i32* (...) @foo( i32 123 )
- ret i32* %ret
+declare ptr @foo(...)
+define ptr @bar() {
+ %ret = call ptr (...) @foo( i32 123 )
+ ret ptr %ret
}
@baz = global i32 0
diff --git a/llvm/test/Linker/Inputs/byref-type-input.ll b/llvm/test/Linker/Inputs/byref-type-input.ll
index 1ca8a897327b5..b744c44ecae8c 100644
--- a/llvm/test/Linker/Inputs/byref-type-input.ll
+++ b/llvm/test/Linker/Inputs/byref-type-input.ll
@@ -1,13 +1,13 @@
%a = type { i64 }
%struct = type { i32, i8 }
-define void @g(%a* byref(%a)) {
+define void @g(ptr byref(%a)) {
ret void
}
-declare void @baz(%struct* byref(%struct))
+declare void @baz(ptr byref(%struct))
-define void @foo(%struct* byref(%struct) %a) {
- call void @baz(%struct* byref(%struct) %a)
+define void @foo(ptr byref(%struct) %a) {
+ call void @baz(ptr byref(%struct) %a)
ret void
}
diff --git a/llvm/test/Linker/Inputs/byval-types-1.ll b/llvm/test/Linker/Inputs/byval-types-1.ll
index 3da8b91f619e3..d8661975a31db 100644
--- a/llvm/test/Linker/Inputs/byval-types-1.ll
+++ b/llvm/test/Linker/Inputs/byval-types-1.ll
@@ -1,8 +1,8 @@
%struct = type {i32, i8}
-declare void @baz(%struct* byval(%struct))
+declare void @baz(ptr byval(%struct))
-define void @foo(%struct* byval(%struct) %a) {
- call void @baz(%struct* byval(%struct) %a)
+define void @foo(ptr byval(%struct) %a) {
+ call void @baz(ptr byval(%struct) %a)
ret void
}
diff --git a/llvm/test/Linker/Inputs/ctors.ll b/llvm/test/Linker/Inputs/ctors.ll
index f3307bc554e97..f19931f748406 100644
--- a/llvm/test/Linker/Inputs/ctors.ll
+++ b/llvm/test/Linker/Inputs/ctors.ll
@@ -1,5 +1,5 @@
@v = weak global i8 1
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v}]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @f, ptr @v}]
define weak void @f() {
ret void
diff --git a/llvm/test/Linker/Inputs/ctors2.ll b/llvm/test/Linker/Inputs/ctors2.ll
index e2fe5ff429c0c..1f2d6434181d5 100644
--- a/llvm/test/Linker/Inputs/ctors2.ll
+++ b/llvm/test/Linker/Inputs/ctors2.ll
@@ -1,6 +1,6 @@
$foo = comdat any
@foo = global i8 1, comdat
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @bar, i8* @foo }]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @bar, ptr @foo }]
define void @bar() comdat($foo) {
ret void
}
diff --git a/llvm/test/Linker/Inputs/ctors3.ll b/llvm/test/Linker/Inputs/ctors3.ll
index 449ccbd90fafb..c4f4420f8c386 100644
--- a/llvm/test/Linker/Inputs/ctors3.ll
+++ b/llvm/test/Linker/Inputs/ctors3.ll
@@ -1,7 +1,7 @@
$foo = comdat any
%t = type { i8 }
@foo = global %t zeroinitializer, comdat
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @bar, i8* getelementptr (%t, %t* @foo, i32 0, i32 0) }]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @bar, ptr @foo }]
define internal void @bar() comdat($foo) {
ret void
}
diff --git a/llvm/test/Linker/Inputs/distinct.ll b/llvm/test/Linker/Inputs/distinct.ll
index 07ae224d28ae7..3f1989027e5ec 100644
--- a/llvm/test/Linker/Inputs/distinct.ll
+++ b/llvm/test/Linker/Inputs/distinct.ll
@@ -4,10 +4,10 @@
!0 = !{}
!1 = !{!0}
-!2 = !{i32* @global}
+!2 = !{ptr @global}
!3 = distinct !{}
!4 = distinct !{!0}
-!5 = distinct !{i32* @global}
+!5 = distinct !{ptr @global}
!6 = !{!3}
!7 = !{!4}
!8 = !{!5}
diff --git a/llvm/test/Linker/Inputs/elementtype-struct-2.ll b/llvm/test/Linker/Inputs/elementtype-struct-2.ll
index f36d30655cc3e..75eb96f8e41da 100644
--- a/llvm/test/Linker/Inputs/elementtype-struct-2.ll
+++ b/llvm/test/Linker/Inputs/elementtype-struct-2.ll
@@ -1,8 +1,8 @@
%struct = type {i32, i8}
define void @struct_elementtype_2() {
- call %struct* @llvm.preserve.array.access.index.p0s_structs.p0s_structs(%struct* elementtype(%struct) null, i32 0, i32 0)
+ call ptr @llvm.preserve.array.access.index.p0.p0(ptr elementtype(%struct) null, i32 0, i32 0)
ret void
}
-declare %struct* @llvm.preserve.array.access.index.p0s_structs.p0s_structs(%struct*, i32, i32)
+declare ptr @llvm.preserve.array.access.index.p0.p0(ptr, i32, i32)
diff --git a/llvm/test/Linker/Inputs/fixed-vector-type-construction.ll b/llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
index 1b6baf579047f..f05f5cf39da31 100644
--- a/llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
+++ b/llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
@@ -1,4 +1,4 @@
%t = type {i32, float}
-define void @foo(<4 x %t*> %x) {
+define void @foo(<4 x ptr> %x) {
ret void
}
diff --git a/llvm/test/Linker/Inputs/funcimport_appending_global.ll b/llvm/test/Linker/Inputs/funcimport_appending_global.ll
index 413b890b02ad4..dec3ee04b2012 100644
--- a/llvm/test/Linker/Inputs/funcimport_appending_global.ll
+++ b/llvm/test/Linker/Inputs/funcimport_appending_global.ll
@@ -1,5 +1,5 @@
@v = weak global i8 1
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @foo, i8* @v}]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @foo, ptr @v}]
define void @foo() {
ret void
diff --git a/llvm/test/Linker/Inputs/globalorder-2.ll b/llvm/test/Linker/Inputs/globalorder-2.ll
index a984ebf78a6a5..338c5f41765d4 100644
--- a/llvm/test/Linker/Inputs/globalorder-2.ll
+++ b/llvm/test/Linker/Inputs/globalorder-2.ll
@@ -1,14 +1,14 @@
@var5 = internal global i32 0, align 4
@var6 = internal global i32 0, align 4
- at var7 = global i32* @var5, align 4
- at var8 = global i32* @var6, align 4
+ at var7 = global ptr @var5, align 4
+ at var8 = global ptr @var6, align 4
define i32 @foo2() {
entry:
- %0 = load i32*, i32** @var7, align 4
- %1 = load i32, i32* %0, align 4
- %2 = load i32*, i32** @var8, align 4
- %3 = load i32, i32* %2, align 4
+ %0 = load ptr, ptr @var7, align 4
+ %1 = load i32, ptr %0, align 4
+ %2 = load ptr, ptr @var8, align 4
+ %3 = load i32, ptr %2, align 4
%add = add nsw i32 %3, %1
ret i32 %add
}
diff --git a/llvm/test/Linker/Inputs/inalloca-type-input.ll b/llvm/test/Linker/Inputs/inalloca-type-input.ll
index 7fa2d8fdb3f3d..b7fdd98c28bf4 100644
--- a/llvm/test/Linker/Inputs/inalloca-type-input.ll
+++ b/llvm/test/Linker/Inputs/inalloca-type-input.ll
@@ -1,13 +1,13 @@
%a = type { i64 }
%struct = type { i32, i8 }
-define void @g(%a* inalloca(%a)) {
+define void @g(ptr inalloca(%a)) {
ret void
}
-declare void @baz(%struct* inalloca(%struct))
+declare void @baz(ptr inalloca(%struct))
-define void @foo(%struct* inalloca(%struct) %a) {
- call void @baz(%struct* inalloca(%struct) %a)
+define void @foo(ptr inalloca(%struct) %a) {
+ call void @baz(ptr inalloca(%struct) %a)
ret void
}
diff --git a/llvm/test/Linker/Inputs/linkage.b.ll b/llvm/test/Linker/Inputs/linkage.b.ll
index 9c1d066602200..541ba81f37aee 100644
--- a/llvm/test/Linker/Inputs/linkage.b.ll
+++ b/llvm/test/Linker/Inputs/linkage.b.ll
@@ -3,7 +3,7 @@
declare i32 @foo()
define void @bar() {
- load i32, i32* @X
+ load i32, ptr @X
call i32 @foo()
ret void
}
diff --git a/llvm/test/Linker/Inputs/linkage.d.ll b/llvm/test/Linker/Inputs/linkage.d.ll
index aaf010d388559..2fce8ce076ed4 100644
--- a/llvm/test/Linker/Inputs/linkage.d.ll
+++ b/llvm/test/Linker/Inputs/linkage.d.ll
@@ -2,4 +2,4 @@
define i64 @foo() { ret i64 7 }
- at llvm.used = appending global [2 x i8*] [i8* @Y, i8* bitcast (i64 ()* @foo to i8*)], section "llvm.metadata"
+ at llvm.used = appending global [2 x ptr] [ptr @Y, ptr @foo], section "llvm.metadata"
diff --git a/llvm/test/Linker/Inputs/metadata-attach.ll b/llvm/test/Linker/Inputs/metadata-attach.ll
index e1752297d2598..1ff4302651cf8 100644
--- a/llvm/test/Linker/Inputs/metadata-attach.ll
+++ b/llvm/test/Linker/Inputs/metadata-attach.ll
@@ -8,7 +8,7 @@ declare !attach !0 void @f1()
define void @f2() !attach !0 {
call void @f1()
- store i32 0, i32* @g1
+ store i32 0, ptr @g1
ret void
}
diff --git a/llvm/test/Linker/Inputs/odr-lambda-2.ll b/llvm/test/Linker/Inputs/odr-lambda-2.ll
index 2784da6a99a26..2fcf906299885 100644
--- a/llvm/test/Linker/Inputs/odr-lambda-2.ll
+++ b/llvm/test/Linker/Inputs/odr-lambda-2.ll
@@ -20,15 +20,15 @@ target triple = "x86_64-apple-macosx10.13.0"
%class.anon = type { i8 }
; Function Attrs: noinline norecurse nounwind optnone ssp uwtable
-define i32 @main(i32 %argc, i8** %argv) #0 !dbg !8 {
+define i32 @main(i32 %argc, ptr %argv) #0 !dbg !8 {
entry:
%argc.addr = alloca i32, align 4
- %argv.addr = alloca i8**, align 8
+ %argv.addr = alloca ptr, align 8
%agg.tmp = alloca %class.Error, align 1
- store i32 %argc, i32* %argc.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !15, metadata !DIExpression()), !dbg !16
- store i8** %argv, i8*** %argv.addr, align 8
- call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !17, metadata !DIExpression()), !dbg !18
+ store i32 %argc, ptr %argc.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %argc.addr, metadata !15, metadata !DIExpression()), !dbg !16
+ store ptr %argv, ptr %argv.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %argv.addr, metadata !17, metadata !DIExpression()), !dbg !18
call void @_Z12consumeError5Error(), !dbg !19
ret i32 0, !dbg !20
}
@@ -41,7 +41,7 @@ define linkonce_odr void @_Z12consumeError5Error() #2 !dbg !21 {
entry:
%Err = alloca %class.Error, align 1
%agg.tmp = alloca %class.anon, align 1
- call void @llvm.dbg.declare(metadata %class.Error* %Err, metadata !25, metadata !DIExpression()), !dbg !26
+ call void @llvm.dbg.declare(metadata ptr %Err, metadata !25, metadata !DIExpression()), !dbg !26
call void @_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_(), !dbg !27
ret void, !dbg !28
}
@@ -50,7 +50,7 @@ entry:
define linkonce_odr void @_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_() #2 !dbg !29 {
entry:
%Handlers = alloca %class.anon, align 1
- call void @llvm.dbg.declare(metadata %class.anon* %Handlers, metadata !35, metadata !DIExpression()), !dbg !36
+ call void @llvm.dbg.declare(metadata ptr %Handlers, metadata !35, metadata !DIExpression()), !dbg !36
ret void, !dbg !37
}
diff --git a/llvm/test/Linker/Inputs/only-needed-compiler-used.ll b/llvm/test/Linker/Inputs/only-needed-compiler-used.ll
index 6e837aa102158..6d0fbdb4ceb78 100644
--- a/llvm/test/Linker/Inputs/only-needed-compiler-used.ll
+++ b/llvm/test/Linker/Inputs/only-needed-compiler-used.ll
@@ -1,7 +1,7 @@
@used1 = global i8 4
@used2 = global i32 123
- at llvm.compiler.used = appending global [2 x i8*] [
- i8* @used1,
- i8* bitcast (i32* @used2 to i8*)
+ at llvm.compiler.used = appending global [2 x ptr] [
+ ptr @used1,
+ ptr @used2
], section "llvm.metadata"
diff --git a/llvm/test/Linker/Inputs/only-needed-ctors.ll b/llvm/test/Linker/Inputs/only-needed-ctors.ll
index d95f3711ef526..8ea53e8339ad5 100644
--- a/llvm/test/Linker/Inputs/only-needed-ctors.ll
+++ b/llvm/test/Linker/Inputs/only-needed-ctors.ll
@@ -15,6 +15,6 @@ define void @unused() {
ret void
}
- at llvm.global_ctors = appending global[2 x{i32, void() *, i8 * }] [
- {i32, void() *, i8 * } { i32 2, void() *@ctor1, i8 *null},
- {i32, void() *, i8 * } { i32 7, void() *@ctor2, i8 *null}]
+ at llvm.global_ctors = appending global[2 x{i32, ptr, ptr }] [
+ {i32, ptr, ptr } { i32 2, ptr @ctor1, ptr null},
+ {i32, ptr, ptr } { i32 7, ptr @ctor2, ptr null}]
diff --git a/llvm/test/Linker/Inputs/only-needed-dtors.ll b/llvm/test/Linker/Inputs/only-needed-dtors.ll
index 31aaf7bb74e1d..a5883b373f3de 100644
--- a/llvm/test/Linker/Inputs/only-needed-dtors.ll
+++ b/llvm/test/Linker/Inputs/only-needed-dtors.ll
@@ -15,6 +15,6 @@ define void @unused() {
ret void
}
- at llvm.global_dtors = appending global[2 x{i32, void() *, i8 * }] [
- {i32, void() *, i8 * } { i32 2, void() *@dtor1, i8 *null},
- {i32, void() *, i8 * } { i32 7, void() *@dtor2, i8 *null}]
+ at llvm.global_dtors = appending global[2 x{i32, ptr, ptr }] [
+ {i32, ptr, ptr } { i32 2, ptr @dtor1, ptr null},
+ {i32, ptr, ptr } { i32 7, ptr @dtor2, ptr null}]
diff --git a/llvm/test/Linker/Inputs/only-needed-named-metadata.ll b/llvm/test/Linker/Inputs/only-needed-named-metadata.ll
index fa7bc2e3cc874..b9e29ae12819c 100644
--- a/llvm/test/Linker/Inputs/only-needed-named-metadata.ll
+++ b/llvm/test/Linker/Inputs/only-needed-named-metadata.ll
@@ -3,7 +3,7 @@
declare i32 @foo()
define void @bar() {
- load i32, i32* @X
+ load i32, ptr @X
call i32 @foo()
ret void
}
diff --git a/llvm/test/Linker/Inputs/only-needed-used.ll b/llvm/test/Linker/Inputs/only-needed-used.ll
index 9387a13d72803..f5c7abdec27ac 100644
--- a/llvm/test/Linker/Inputs/only-needed-used.ll
+++ b/llvm/test/Linker/Inputs/only-needed-used.ll
@@ -1,7 +1,7 @@
@used1 = global i8 4
@used2 = global i32 123
- at llvm.used = appending global [2 x i8*] [
- i8* @used1,
- i8* bitcast (i32* @used2 to i8*)
+ at llvm.used = appending global [2 x ptr] [
+ ptr @used1,
+ ptr @used2
], section "llvm.metadata"
diff --git a/llvm/test/Linker/Inputs/opaque.ll b/llvm/test/Linker/Inputs/opaque.ll
index a5f27cba418ea..eade7e9f97ad4 100644
--- a/llvm/test/Linker/Inputs/opaque.ll
+++ b/llvm/test/Linker/Inputs/opaque.ll
@@ -1,5 +1,5 @@
%A = type { }
-%B = type { %D, %E, %B* }
+%B = type { %D, %E, ptr }
%D = type { %E }
%E = type opaque
@@ -8,14 +8,14 @@
@g3 = external global %B
define void @f1() {
- getelementptr %A, %A* null, i32 0
+ getelementptr %A, ptr null, i32 0
ret void
}
-define %A* @use_g2() {
- ret %A* @g2
+define ptr @use_g2() {
+ ret ptr @g2
}
-define %B* @use_g3() {
- ret %B* @g3
+define ptr @use_g3() {
+ ret ptr @g3
}
diff --git a/llvm/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll b/llvm/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll
index d42eb9ffa86ab..e71314f9c3e41 100644
--- a/llvm/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll
+++ b/llvm/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll
@@ -1,10 +1,10 @@
%struct.Class = type { i8 }
-define weak_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this) align 2 !dbg !4 {
+define weak_odr i32 @_ZN5ClassIiE3fooEv(ptr %this) align 2 !dbg !4 {
entry:
- %this.addr = alloca %struct.Class*, align 8
- store %struct.Class* %this, %struct.Class** %this.addr, align 8
- %this1 = load %struct.Class*, %struct.Class** %this.addr
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ %this1 = load ptr, ptr %this.addr
ret i32 0, !dbg !12
}
diff --git a/llvm/test/Linker/Inputs/sret-type-input.ll b/llvm/test/Linker/Inputs/sret-type-input.ll
index 2f6fd8bb5987a..8f984349af3a9 100644
--- a/llvm/test/Linker/Inputs/sret-type-input.ll
+++ b/llvm/test/Linker/Inputs/sret-type-input.ll
@@ -1,13 +1,13 @@
%a = type { i64 }
%struct = type { i32, i8 }
-define void @g(%a* sret(%a)) {
+define void @g(ptr sret(%a)) {
ret void
}
-declare void @baz(%struct* sret(%struct))
+declare void @baz(ptr sret(%struct))
-define void @foo(%struct* sret(%struct) %a) {
- call void @baz(%struct* sret(%struct) %a)
+define void @foo(ptr sret(%struct) %a) {
+ call void @baz(ptr sret(%struct) %a)
ret void
}
diff --git a/llvm/test/Linker/Inputs/type-unique-alias.ll b/llvm/test/Linker/Inputs/type-unique-alias.ll
index 5a3dc7d370111..d243c3a16972d 100644
--- a/llvm/test/Linker/Inputs/type-unique-alias.ll
+++ b/llvm/test/Linker/Inputs/type-unique-alias.ll
@@ -1,4 +1,4 @@
%u = type { i8 }
@g2 = global %u zeroinitializer
- at a = weak alias %u, %u* @g2
+ at a = weak alias %u, ptr @g2
diff --git a/llvm/test/Linker/Inputs/type-unique-dst-types2.ll b/llvm/test/Linker/Inputs/type-unique-dst-types2.ll
index 7770ea3cca072..14d79a4a81fc0 100644
--- a/llvm/test/Linker/Inputs/type-unique-dst-types2.ll
+++ b/llvm/test/Linker/Inputs/type-unique-dst-types2.ll
@@ -2,6 +2,6 @@
%B = type { i8 }
@g1 = external global %A.11
-define %A.11* @use_g1() {
- ret %A.11* @g1
+define ptr @use_g1() {
+ ret ptr @g1
}
diff --git a/llvm/test/Linker/Inputs/type-unique-dst-types3.ll b/llvm/test/Linker/Inputs/type-unique-dst-types3.ll
index 8a5ac26947916..45f9e5fd2cb18 100644
--- a/llvm/test/Linker/Inputs/type-unique-dst-types3.ll
+++ b/llvm/test/Linker/Inputs/type-unique-dst-types3.ll
@@ -1,6 +1,6 @@
%A.11 = type opaque
@g2 = external global %A.11
-define %A.11* @use_g2() {
- ret %A.11* @g2
+define ptr @use_g2() {
+ ret ptr @g2
}
diff --git a/llvm/test/Linker/Inputs/type-unique-inheritance-a.ll b/llvm/test/Linker/Inputs/type-unique-inheritance-a.ll
index 0f6b98072d5b3..1861e32a52e2f 100644
--- a/llvm/test/Linker/Inputs/type-unique-inheritance-a.ll
+++ b/llvm/test/Linker/Inputs/type-unique-inheritance-a.ll
@@ -51,9 +51,9 @@ define void @_Z1fi(i32 %a) #0 !dbg !15 {
entry:
%a.addr = alloca i32, align 4
%t = alloca %class.A, align 4
- store i32 %a, i32* %a.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !20, metadata !DIExpression()), !dbg !21
- call void @llvm.dbg.declare(metadata %class.A* %t, metadata !22, metadata !DIExpression()), !dbg !23
+ store i32 %a, ptr %a.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !20, metadata !DIExpression()), !dbg !21
+ call void @llvm.dbg.declare(metadata ptr %t, metadata !22, metadata !DIExpression()), !dbg !23
ret void, !dbg !24
}
diff --git a/llvm/test/Linker/Inputs/type-unique-inheritance-b.ll b/llvm/test/Linker/Inputs/type-unique-inheritance-b.ll
index 6ae2da5cd38ef..c11b0a1c6964f 100644
--- a/llvm/test/Linker/Inputs/type-unique-inheritance-b.ll
+++ b/llvm/test/Linker/Inputs/type-unique-inheritance-b.ll
@@ -1,6 +1,6 @@
; ModuleID = 'bar.cpp'
-%class.B = type { i32, %class.A* }
+%class.B = type { i32, ptr }
%class.A = type { %class.Base, i32 }
%class.Base = type { i32 }
@@ -9,9 +9,9 @@ define void @_Z1gi(i32 %a) #0 !dbg !20 {
entry:
%a.addr = alloca i32, align 4
%t = alloca %class.B, align 8
- store i32 %a, i32* %a.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !28, metadata !DIExpression()), !dbg !29
- call void @llvm.dbg.declare(metadata %class.B* %t, metadata !30, metadata !DIExpression()), !dbg !31
+ store i32 %a, ptr %a.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !28, metadata !DIExpression()), !dbg !29
+ call void @llvm.dbg.declare(metadata ptr %t, metadata !30, metadata !DIExpression()), !dbg !31
ret void, !dbg !32
}
@@ -23,8 +23,8 @@ define i32 @main() #2 !dbg !24 {
entry:
%retval = alloca i32, align 4
%a = alloca %class.A, align 4
- store i32 0, i32* %retval
- call void @llvm.dbg.declare(metadata %class.A* %a, metadata !33, metadata !DIExpression()), !dbg !34
+ store i32 0, ptr %retval
+ call void @llvm.dbg.declare(metadata ptr %a, metadata !33, metadata !DIExpression()), !dbg !34
call void @_Z1fi(i32 0), !dbg !35
call void @_Z1gi(i32 1), !dbg !36
ret i32 0, !dbg !37
diff --git a/llvm/test/Linker/Inputs/type-unique-simple2-a.ll b/llvm/test/Linker/Inputs/type-unique-simple2-a.ll
index 5cac92a60876e..e4c7d9165b27b 100644
--- a/llvm/test/Linker/Inputs/type-unique-simple2-a.ll
+++ b/llvm/test/Linker/Inputs/type-unique-simple2-a.ll
@@ -41,16 +41,16 @@
; }
; ModuleID = 'foo.cpp'
-%struct.Base = type { i32, %struct.Base* }
+%struct.Base = type { i32, ptr }
; Function Attrs: nounwind ssp uwtable
define void @_Z1fi(i32 %a) #0 !dbg !12 {
entry:
%a.addr = alloca i32, align 4
%t = alloca %struct.Base, align 8
- store i32 %a, i32* %a.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !17, metadata !DIExpression()), !dbg !18
- call void @llvm.dbg.declare(metadata %struct.Base* %t, metadata !19, metadata !DIExpression()), !dbg !20
+ store i32 %a, ptr %a.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !17, metadata !DIExpression()), !dbg !18
+ call void @llvm.dbg.declare(metadata ptr %t, metadata !19, metadata !DIExpression()), !dbg !20
ret void, !dbg !21
}
diff --git a/llvm/test/Linker/Inputs/type-unique-simple2-b.ll b/llvm/test/Linker/Inputs/type-unique-simple2-b.ll
index 8fd993b1c2b98..c7eda9dd4c942 100644
--- a/llvm/test/Linker/Inputs/type-unique-simple2-b.ll
+++ b/llvm/test/Linker/Inputs/type-unique-simple2-b.ll
@@ -1,15 +1,15 @@
; ModuleID = 'bar.cpp'
-%struct.Base = type { i32, %struct.Base* }
+%struct.Base = type { i32, ptr }
; Function Attrs: nounwind ssp uwtable
define void @_Z1gi(i32 %a) #0 !dbg !12 {
entry:
%a.addr = alloca i32, align 4
%t = alloca %struct.Base, align 8
- store i32 %a, i32* %a.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !20, metadata !DIExpression()), !dbg !21
- call void @llvm.dbg.declare(metadata %struct.Base* %t, metadata !22, metadata !DIExpression()), !dbg !23
+ store i32 %a, ptr %a.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !20, metadata !DIExpression()), !dbg !21
+ call void @llvm.dbg.declare(metadata ptr %t, metadata !22, metadata !DIExpression()), !dbg !23
ret void, !dbg !24
}
@@ -20,7 +20,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
define i32 @main() #2 !dbg !16 {
entry:
%retval = alloca i32, align 4
- store i32 0, i32* %retval
+ store i32 0, ptr %retval
call void @_Z1fi(i32 0), !dbg !25
call void @_Z1gi(i32 1), !dbg !26
ret i32 0, !dbg !27
diff --git a/llvm/test/Linker/Inputs/type-unique-unrelated2.ll b/llvm/test/Linker/Inputs/type-unique-unrelated2.ll
index b7c2cec18a36f..39ba32c285841 100644
--- a/llvm/test/Linker/Inputs/type-unique-unrelated2.ll
+++ b/llvm/test/Linker/Inputs/type-unique-unrelated2.ll
@@ -1,4 +1,4 @@
-%t = type { i8* }
+%t = type { ptr }
declare %t @g()
define %t @g2() {
diff --git a/llvm/test/Linker/Inputs/type-unique-unrelated3.ll b/llvm/test/Linker/Inputs/type-unique-unrelated3.ll
index e3f2dd944dd09..0d499eadf127b 100644
--- a/llvm/test/Linker/Inputs/type-unique-unrelated3.ll
+++ b/llvm/test/Linker/Inputs/type-unique-unrelated3.ll
@@ -1,4 +1,4 @@
-%t = type { i8* }
+%t = type { ptr }
declare %t @f()
define %t @g() {
diff --git a/llvm/test/Linker/Inputs/visibility.ll b/llvm/test/Linker/Inputs/visibility.ll
index 286bee5d783b3..4516d2cb82a43 100644
--- a/llvm/test/Linker/Inputs/visibility.ll
+++ b/llvm/test/Linker/Inputs/visibility.ll
@@ -7,9 +7,9 @@ $c1 = comdat any
@v4 = hidden global i32 1, comdat($c1)
; Aliases
- at a1 = weak hidden alias i32, i32* @v1
- at a2 = weak protected alias i32, i32* @v2
- at a3 = weak hidden alias i32, i32* @v3
+ at a1 = weak hidden alias i32, ptr @v1
+ at a2 = weak protected alias i32, ptr @v2
+ at a3 = weak hidden alias i32, ptr @v3
; Functions
define weak hidden void @f1() {
diff --git a/llvm/test/Linker/LinkOnce.ll b/llvm/test/Linker/LinkOnce.ll
index 56633fb8da7b2..76c7a6ca7b2c7 100644
--- a/llvm/test/Linker/LinkOnce.ll
+++ b/llvm/test/Linker/LinkOnce.ll
@@ -5,4 +5,4 @@
; RUN: llvm-as < %s > %t.1.bc
; RUN: llvm-link %t.1.bc %t.2.bc -S
- at X = linkonce global i32 7 ; <i32*> [#uses=0]
+ at X = linkonce global i32 7 ; <ptr> [#uses=0]
diff --git a/llvm/test/Linker/addrspace.ll b/llvm/test/Linker/addrspace.ll
index 713aa01fc9dd5..f503b1183d7f9 100644
--- a/llvm/test/Linker/addrspace.ll
+++ b/llvm/test/Linker/addrspace.ll
@@ -3,8 +3,8 @@
@G = addrspace(2) global i32 256
; CHECK: @G = addrspace(2) global i32
- at GA = alias i32, i32 addrspace(2)* @G
-; CHECK: @GA = alias i32, i32 addrspace(2)* @G
+ at GA = alias i32, ptr addrspace(2) @G
+; CHECK: @GA = alias i32, ptr addrspace(2) @G
define void @foo() addrspace(3) {
; CHECK: define void @foo() addrspace(3)
diff --git a/llvm/test/Linker/alias-3.ll b/llvm/test/Linker/alias-3.ll
index 4fb88a65c196e..ff8d6a60922e2 100644
--- a/llvm/test/Linker/alias-3.ll
+++ b/llvm/test/Linker/alias-3.ll
@@ -3,11 +3,11 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9"
; CHECK-DAG: @A = internal constant i8 1
-; CHECK-DAG: @B = alias i8, i8* @A
-; CHECK-DAG: @C = global [2 x i8*] [i8* @A, i8* @B]
+; CHECK-DAG: @B = alias i8, ptr @A
+; CHECK-DAG: @C = global [2 x ptr] [ptr @A, ptr @B]
@A = internal constant i8 1
- at B = alias i8, i8* @A
- at C = global [2 x i8*] [i8* @A, i8* @B]
+ at B = alias i8, ptr @A
+ at C = global [2 x ptr] [ptr @A, ptr @B]
diff --git a/llvm/test/Linker/alias-4.ll b/llvm/test/Linker/alias-4.ll
index 06de4b2836279..71b043adaf1c1 100644
--- a/llvm/test/Linker/alias-4.ll
+++ b/llvm/test/Linker/alias-4.ll
@@ -2,11 +2,11 @@
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9"
-; CHECK-DAG: @gv0 = constant i64* @alias
-; CHECK-DAG: @gv1 = constant i64 ptrtoint (i64* @gv1 to i64)
-; CHECK-DAG: @alias = alias i64, i64* @gv1
+; CHECK-DAG: @gv0 = constant ptr @alias
+; CHECK-DAG: @gv1 = constant i64 ptrtoint (ptr @gv1 to i64)
+; CHECK-DAG: @alias = alias i64, ptr @gv1
- at gv0 = constant i64* @alias
- at gv1 = constant i64 ptrtoint (i64* @gv1 to i64)
+ at gv0 = constant ptr @alias
+ at gv1 = constant i64 ptrtoint (ptr @gv1 to i64)
- at alias = alias i64, i64* @gv1
+ at alias = alias i64, ptr @gv1
diff --git a/llvm/test/Linker/alias.ll b/llvm/test/Linker/alias.ll
index ae9da70174e8c..90f9d6fa5480d 100644
--- a/llvm/test/Linker/alias.ll
+++ b/llvm/test/Linker/alias.ll
@@ -14,24 +14,24 @@
; before using the IRMover.
@foo = weak global i32 0
-; C1-DAG: @foo = alias i32, i32* @zed
-; C2-DAG: @foo = alias i32, i32* @zed
+; C1-DAG: @foo = alias i32, ptr @zed
+; C2-DAG: @foo = alias i32, ptr @zed
- at bar = alias i32, i32* @foo
-; C1-DAG: @bar = alias i32, i32* @foo
+ at bar = alias i32, ptr @foo
+; C1-DAG: @bar = alias i32, ptr @foo
; C2-DAG: @foo.1 = internal global i32 0
-; C2-DAG: @bar = alias i32, i32* @foo.1
+; C2-DAG: @bar = alias i32, ptr @foo.1
@foo2 = weak global i32 0
-; C1-DAG: @foo2 = alias i16, bitcast (i32* @zed to i16*)
-; C2-DAG: @foo2 = alias i16, bitcast (i32* @zed to i16*)
+; C1-DAG: @foo2 = alias i16, ptr @zed
+; C2-DAG: @foo2 = alias i16, ptr @zed
- at bar2 = alias i32, i32* @foo2
-; C1-DAG: @bar2 = alias i32, bitcast (i16* @foo2 to i32*)
+ at bar2 = alias i32, ptr @foo2
+; C1-DAG: @bar2 = alias i32, ptr @foo2
; C2-DAG: @foo2.2 = internal global i32 0
-; C2-DAG: @bar2 = alias i32, i32* @foo2.2
+; C2-DAG: @bar2 = alias i32, ptr @foo2.2
; C1-DAG: @zed = global i32 42
; C2-DAG: @zed = global i32 42
diff --git a/llvm/test/Linker/appending-global-crash.ll b/llvm/test/Linker/appending-global-crash.ll
index 28987e2ec97bb..084d99eb74f05 100644
--- a/llvm/test/Linker/appending-global-crash.ll
+++ b/llvm/test/Linker/appending-global-crash.ll
@@ -3,8 +3,8 @@
; Check that llvm-link does not crash when materializing appending global with
; initializer depending on another appending global.
-; CHECK-DAG: @use = appending global [1 x i8*] [i8* bitcast ([1 x i8*]* @var to i8*)]
-; CHECK-DAG: @var = appending global [1 x i8*] undef
+; CHECK-DAG: @use = appending global [1 x ptr] [ptr @var]
+; CHECK-DAG: @var = appending global [1 x ptr] undef
- at use = appending global [1 x i8*] [i8* bitcast ([1 x i8*]* @var to i8*)]
- at var = appending global [1 x i8*] undef
+ at use = appending global [1 x ptr] [ptr @var]
+ at var = appending global [1 x ptr] undef
diff --git a/llvm/test/Linker/appending-global-err1.ll b/llvm/test/Linker/appending-global-err1.ll
index 8bc626d8ef724..da7ea3db7574c 100644
--- a/llvm/test/Linker/appending-global-err1.ll
+++ b/llvm/test/Linker/appending-global-err1.ll
@@ -6,4 +6,4 @@
; CHECK: can only link appending global with another appending global
- at var = global i8* undef
+ at var = global ptr undef
diff --git a/llvm/test/Linker/appending-global-err2.ll b/llvm/test/Linker/appending-global-err2.ll
index 19818a07fcbd4..23a946ca5e2b3 100644
--- a/llvm/test/Linker/appending-global-err2.ll
+++ b/llvm/test/Linker/appending-global-err2.ll
@@ -6,4 +6,4 @@
; CHECK: Appending variables linked with
diff erent const'ness
- at var = appending constant [1 x i8* ] undef
+ at var = appending constant [1 x ptr ] undef
diff --git a/llvm/test/Linker/appending-global-err3.ll b/llvm/test/Linker/appending-global-err3.ll
index 7f5ba2b31716b..85607ac26f6e9 100644
--- a/llvm/test/Linker/appending-global-err3.ll
+++ b/llvm/test/Linker/appending-global-err3.ll
@@ -6,4 +6,4 @@
; CHECK: Appending variables with
diff erent element types
- at var = appending global [1 x i32* ] undef
+ at var = appending global [1 x i32] undef
diff --git a/llvm/test/Linker/appending-global-err4.ll b/llvm/test/Linker/appending-global-err4.ll
index 4416e3cebf5dc..316c3c8412223 100644
--- a/llvm/test/Linker/appending-global-err4.ll
+++ b/llvm/test/Linker/appending-global-err4.ll
@@ -6,4 +6,4 @@
; CHECK: Appending variables with
diff erent visibility need to be linked
- at var = appending hidden global [1 x i32* ] undef
+ at var = appending hidden global [1 x ptr ] undef
diff --git a/llvm/test/Linker/appending-global-err5.ll b/llvm/test/Linker/appending-global-err5.ll
index fefbee387c0d8..1c829bb900331 100644
--- a/llvm/test/Linker/appending-global-err5.ll
+++ b/llvm/test/Linker/appending-global-err5.ll
@@ -6,4 +6,4 @@
; CHECK: Appending variables with
diff erent section name need to be linked
- at var = appending global [1 x i32* ] undef, section "dummy"
+ at var = appending global [1 x ptr ] undef, section "dummy"
diff --git a/llvm/test/Linker/appending-global-proto.ll b/llvm/test/Linker/appending-global-proto.ll
index 0234c052798bb..4d24cf2a86e62 100644
--- a/llvm/test/Linker/appending-global-proto.ll
+++ b/llvm/test/Linker/appending-global-proto.ll
@@ -4,8 +4,8 @@
; Checks that we can link global variable with appending linkage with the
; existing external declaration.
-; CHECK-DAG: @var = appending global [1 x i8*] undef
-; CHECK-DAG: @use = global [1 x i8*] [i8* bitcast ([1 x i8*]* @var to i8*)]
+; CHECK-DAG: @var = appending global [1 x ptr] undef
+; CHECK-DAG: @use = global [1 x ptr] [ptr @var]
- at var = external global i8*
- at use = global [1 x i8*] [i8* bitcast (i8** @var to i8*)]
+ at var = external global ptr
+ at use = global [1 x ptr] [ptr @var]
diff --git a/llvm/test/Linker/available_externally_over_decl.ll b/llvm/test/Linker/available_externally_over_decl.ll
index 0104967ef544a..60f9acfccd359 100644
--- a/llvm/test/Linker/available_externally_over_decl.ll
+++ b/llvm/test/Linker/available_externally_over_decl.ll
@@ -6,9 +6,9 @@ define available_externally void @g() {
ret void
}
-define void ()* @main() {
+define ptr @main() {
call void @g()
- ret void ()* @f
+ ret ptr @f
}
; CHECK-DAG: define available_externally void @g() {
diff --git a/llvm/test/Linker/blockaddress.ll b/llvm/test/Linker/blockaddress.ll
index 9501161d5d450..0e5f9bf37ea98 100644
--- a/llvm/test/Linker/blockaddress.ll
+++ b/llvm/test/Linker/blockaddress.ll
@@ -1,7 +1,7 @@
; RUN: llvm-as %s -o %t.bc
; RUN: llvm-link %t.bc -S | FileCheck %s
-declare void @f(i8*)
+declare void @f(ptr)
; Test that a blockaddress in @y referring to %label in @x can be moved when @y
; appears after @x.
@@ -15,8 +15,8 @@ label:
define void @y() {
; CHECK: define void @y() {
-; CHECK-NEXT: call void @f(i8* blockaddress(@x, %label))
- call void @f(i8* blockaddress(@x, %label))
+; CHECK-NEXT: call void @f(ptr blockaddress(@x, %label))
+ call void @f(ptr blockaddress(@x, %label))
ret void
}
@@ -24,8 +24,8 @@ define void @y() {
; appears before @b.
define void @a() {
; CHECK: define void @a() {
-; CHECK-NEXT: call void @f(i8* blockaddress(@b, %label))
- call void @f(i8* blockaddress(@b, %label))
+; CHECK-NEXT: call void @f(ptr blockaddress(@b, %label))
+ call void @f(ptr blockaddress(@b, %label))
ret void
}
@@ -45,11 +45,11 @@ define void @c() {
; CHECK-NEXT: br label %label
; CHECK-EMPTY:
; CHECK-NEXT: label:
-; CHECK-NEXT: call void @f(i8* blockaddress(@d, %label))
+; CHECK-NEXT: call void @f(ptr blockaddress(@d, %label))
br label %label
label:
- call void @f(i8* blockaddress(@d, %label))
+ call void @f(ptr blockaddress(@d, %label))
ret void
}
@@ -58,11 +58,11 @@ define void @d() {
; CHECK-NEXT: br label %label
; CHECK-EMPTY:
; CHECK-NEXT: label:
-; CHECK-NEXT: call void @f(i8* blockaddress(@c, %label))
+; CHECK-NEXT: call void @f(ptr blockaddress(@c, %label))
br label %label
label:
- call void @f(i8* blockaddress(@c, %label))
+ call void @f(ptr blockaddress(@c, %label))
ret void
}
@@ -80,11 +80,11 @@ define linkonce_odr void @lazy() {
; CHECK-NEXT: br label %label
; CHECK-EMPTY:
; CHECK-NEXT: label:
-; CHECK-NEXT: call void @f(i8* blockaddress(@parsed, %label))
+; CHECK-NEXT: call void @f(ptr blockaddress(@parsed, %label))
br label %label
label:
- call void @f(i8* blockaddress(@parsed, %label))
+ call void @f(ptr blockaddress(@parsed, %label))
ret void
}
@@ -106,11 +106,11 @@ define linkonce_odr void @lazy1() {
; CHECK-NEXT: br label %label
; CHECK-EMPTY:
; CHECK-NEXT: label:
-; CHECK-NEXT: call void @f(i8* blockaddress(@parsed3, %label))
+; CHECK-NEXT: call void @f(ptr blockaddress(@parsed3, %label))
br label %label
label:
- call void @f(i8* blockaddress(@parsed3, %label))
+ call void @f(ptr blockaddress(@parsed3, %label))
ret void
}
diff --git a/llvm/test/Linker/byref-types.ll b/llvm/test/Linker/byref-types.ll
index b79fb2d9df8e4..96df1d56c2f68 100644
--- a/llvm/test/Linker/byref-types.ll
+++ b/llvm/test/Linker/byref-types.ll
@@ -3,23 +3,23 @@
%a = type { i64 }
%struct = type { i32, i8 }
-; CHECK-LABEL: define void @f(%a* byref(%a) %0)
-define void @f(%a* byref(%a)) {
+; CHECK-LABEL: define void @f(ptr byref(%a) %0)
+define void @f(ptr byref(%a)) {
ret void
}
; CHECK-LABEL: define void @bar(
-; CHECK: call void @foo(%struct* byref(%struct) %ptr)
+; CHECK: call void @foo(ptr byref(%struct) %ptr)
define void @bar() {
%ptr = alloca %struct
- call void @foo(%struct* byref(%struct) %ptr)
+ call void @foo(ptr byref(%struct) %ptr)
ret void
}
-; CHECK-LABEL: define void @g(%a* byref(%a) %0)
+; CHECK-LABEL: define void @g(ptr byref(%a) %0)
-; CHECK-LABEL: define void @foo(%struct* byref(%struct) %a)
-; CHECK-NEXT: call void @baz(%struct* byref(%struct) %a)
-declare void @foo(%struct* byref(%struct) %a)
+; CHECK-LABEL: define void @foo(ptr byref(%struct) %a)
+; CHECK-NEXT: call void @baz(ptr byref(%struct) %a)
+declare void @foo(ptr byref(%struct) %a)
-; CHECK: declare void @baz(%struct* byref(%struct))
+; CHECK: declare void @baz(ptr byref(%struct))
diff --git a/llvm/test/Linker/byval-types.ll b/llvm/test/Linker/byval-types.ll
index d6bd4aa0c7b9b..94eaaddd0702b 100644
--- a/llvm/test/Linker/byval-types.ll
+++ b/llvm/test/Linker/byval-types.ll
@@ -2,16 +2,16 @@
%struct = type {i32, i8}
-declare void @foo(%struct* byval(%struct) %a)
+declare void @foo(ptr byval(%struct) %a)
define void @bar() {
%ptr = alloca %struct
-; CHECK: call void @foo(%struct* byval(%struct) %ptr)
- call void @foo(%struct* byval(%struct) %ptr)
+; CHECK: call void @foo(ptr byval(%struct) %ptr)
+ call void @foo(ptr byval(%struct) %ptr)
ret void
}
-; CHECK: define void @foo(%struct* byval(%struct) %a)
-; CHECK-NEXT: call void @baz(%struct* byval(%struct) %a)
+; CHECK: define void @foo(ptr byval(%struct) %a)
+; CHECK-NEXT: call void @baz(ptr byval(%struct) %a)
-; CHECK: declare void @baz(%struct* byval(%struct))
+; CHECK: declare void @baz(ptr byval(%struct))
diff --git a/llvm/test/Linker/comdat-largest.ll b/llvm/test/Linker/comdat-largest.ll
index 975bf375e9aeb..02cdfe41ccb9c 100644
--- a/llvm/test/Linker/comdat-largest.ll
+++ b/llvm/test/Linker/comdat-largest.ll
@@ -9,13 +9,13 @@
;--- 1.ll
$c = comdat any
- at a = alias void (), void ()* @f
+ at a = alias void (), ptr @f
define internal void @f() comdat($c) {
ret void
}
; CHECK1-DAG: $c = comdat any
-; CHECK1-DAG: @a = alias void (), void ()* @f
+; CHECK1-DAG: @a = alias void (), ptr @f
; CHECK1-DAG: define internal void @f() comdat($c)
$f2 = comdat largest
@@ -39,9 +39,9 @@ $c = comdat largest
target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
$foo = comdat largest
- at foo = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast (void ()* @bar to i8*)], comdat($foo)
+ at foo = linkonce_odr unnamed_addr constant [1 x ptr] [ptr @bar], comdat($foo)
-; CHECK: @foo = alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* @some_name, i32 0, i32 1)
+; CHECK: @foo = alias ptr, getelementptr inbounds ([2 x ptr], ptr @some_name, i32 0, i32 1)
declare void @bar() unnamed_addr
@@ -51,7 +51,7 @@ target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
$foo = comdat largest
@zed = external constant i8
- at some_name = private unnamed_addr constant [2 x i8*] [i8* @zed, i8* bitcast (void ()* @bar to i8*)], comdat($foo)
- at foo = alias i8*, getelementptr([2 x i8*], [2 x i8*]* @some_name, i32 0, i32 1)
+ at some_name = private unnamed_addr constant [2 x ptr] [ptr @zed, ptr @bar], comdat($foo)
+ at foo = alias ptr, getelementptr([2 x ptr], ptr @some_name, i32 0, i32 1)
declare void @bar() unnamed_addr
diff --git a/llvm/test/Linker/comdat-nonprevailing-decl.ll b/llvm/test/Linker/comdat-nonprevailing-decl.ll
index 4eca915534ce0..d3dfec8fb2bc7 100644
--- a/llvm/test/Linker/comdat-nonprevailing-decl.ll
+++ b/llvm/test/Linker/comdat-nonprevailing-decl.ll
@@ -14,12 +14,12 @@ $c = comdat any
$c = comdat any
@v2 = weak dllexport global i32 0, comdat ($c)
-define i32* @f2() {
- ret i32* @v2
+define ptr @f2() {
+ ret ptr @v2
}
- at v3 = weak alias i32, i32* @v2
-define i32* @f3() {
- ret i32* @v3
+ at v3 = weak alias i32, ptr @v2
+define ptr @f3() {
+ ret ptr @v3
}
diff --git a/llvm/test/Linker/comdat-refer-to-discarded.ll b/llvm/test/Linker/comdat-refer-to-discarded.ll
index 9250469df1bb1..5a776359c43da 100644
--- a/llvm/test/Linker/comdat-refer-to-discarded.ll
+++ b/llvm/test/Linker/comdat-refer-to-discarded.ll
@@ -9,8 +9,8 @@
$foo = comdat any
@foo = internal global i8 0, comdat
-define i8* @bar() {
- ret i8* @foo
+define ptr @bar() {
+ ret ptr @foo
}
; CHECK: $foo = comdat any
@@ -18,13 +18,13 @@ define i8* @bar() {
; CHECK: @foo = internal global i8 0, comdat
; CHECK: @foo.1 = internal global i8 1, comdat($foo)
-; CHECK: define i8* @bar() {
-; CHECK-NEXT: ret i8* @foo
+; CHECK: define ptr @bar() {
+; CHECK-NEXT: ret ptr @foo
; CHECK-NEXT: }
-; CHECK: define i8* @zed() {
+; CHECK: define ptr @zed() {
; CHECK-NEXT: call void @bax()
-; CHECK-NEXT: ret i8* @foo.1
+; CHECK-NEXT: ret ptr @foo.1
; CHECK-NEXT: }
; CHECK: define internal void @bax() comdat($foo) {
@@ -34,9 +34,9 @@ define i8* @bar() {
;--- 1-aux.ll
$foo = comdat any
@foo = internal global i8 1, comdat
-define i8* @zed() {
+define ptr @zed() {
call void @bax()
- ret i8* @foo
+ ret ptr @foo
}
define internal void @bax() comdat($foo) {
ret void
diff --git a/llvm/test/Linker/comdat-rm-dst.ll b/llvm/test/Linker/comdat-rm-dst.ll
index 9722f36563221..35dea754699fa 100644
--- a/llvm/test/Linker/comdat-rm-dst.ll
+++ b/llvm/test/Linker/comdat-rm-dst.ll
@@ -10,18 +10,18 @@ $foo = comdat largest
; CHECK-DAG: @foo = global i64 43, comdat
; RM-NOT: @alias =
- at alias = alias i32, i32* @foo
+ at alias = alias i32, ptr @foo
; We should arguably reject an out of comdat reference to int_alias. Given that
; the verifier accepts it, test that we at least produce an output that passes
; the verifier.
; CHECK-DAG: @int_alias = external global i32
- at int_alias = internal alias i32, i32* @foo
- at bar = global i32* @int_alias
+ at int_alias = internal alias i32, ptr @foo
+ at bar = global ptr @int_alias
- at func_alias = alias void (), void ()* @func
- at zed = global void()* @func_alias
-; CHECK-DAG: @zed = global void ()* @func_alias
+ at func_alias = alias void (), ptr @func
+ at zed = global ptr @func_alias
+; CHECK-DAG: @zed = global ptr @func_alias
; CHECK-DAG: declare void @func_alias()
; RM-NOT: @func()
diff --git a/llvm/test/Linker/comdat-size-err.ll b/llvm/test/Linker/comdat-size-err.ll
index 0222e84620fd5..d223314b68f3c 100644
--- a/llvm/test/Linker/comdat-size-err.ll
+++ b/llvm/test/Linker/comdat-size-err.ll
@@ -15,10 +15,10 @@ define void @c1() comdat($c1) {
$c1 = comdat largest
@some_name = unnamed_addr constant i32 42, comdat($c1)
- at c1 = alias i8, inttoptr (i32 1 to i8*)
+ at c1 = alias i8, inttoptr (i32 1 to ptr)
;--- no-base-object-aux.ll
$c1 = comdat largest
@some_name = private unnamed_addr constant i32 42, comdat($c1)
- at c1 = alias i32, i32* @some_name
+ at c1 = alias i32, ptr @some_name
diff --git a/llvm/test/Linker/comdat_group.ll b/llvm/test/Linker/comdat_group.ll
index 486a6ffb9b1dc..76e548eed9e79 100644
--- a/llvm/test/Linker/comdat_group.ll
+++ b/llvm/test/Linker/comdat_group.ll
@@ -13,6 +13,6 @@ define linkonce void @linkoncecomdat_unref_func() comdat($linkoncecomdat) {
}
; Reference one member of comdat so that comdat is generated.
define void @ref_linkoncecomdat() {
- load i32, i32* @linkoncecomdat, align 4
+ load i32, ptr @linkoncecomdat, align 4
ret void
}
diff --git a/llvm/test/Linker/constructor-comdat.ll b/llvm/test/Linker/constructor-comdat.ll
index 0e8fc440f20b2..b052a6016331e 100644
--- a/llvm/test/Linker/constructor-comdat.ll
+++ b/llvm/test/Linker/constructor-comdat.ll
@@ -5,8 +5,8 @@ $_ZN3fooIiEC5Ev = comdat any
; CHECK: $_ZN3fooIiEC5Ev = comdat any
; NOCOMDAT-NOT: comdat
- at _ZN3fooIiEC1Ev = weak_odr alias void (), void ()* @_ZN3fooIiEC2Ev
-; CHECK: @_ZN3fooIiEC1Ev = weak_odr alias void (), void ()* @_ZN3fooIiEC2Ev
+ at _ZN3fooIiEC1Ev = weak_odr alias void (), ptr @_ZN3fooIiEC2Ev
+; CHECK: @_ZN3fooIiEC1Ev = weak_odr alias void (), ptr @_ZN3fooIiEC2Ev
; NOCOMDAT-DAG: define weak_odr void @_ZN3fooIiEC1Ev() {
; CHECK: define weak_odr void @_ZN3fooIiEC2Ev() comdat($_ZN3fooIiEC5Ev) {
diff --git a/llvm/test/Linker/ctors.ll b/llvm/test/Linker/ctors.ll
index f68ca3e547620..966afba1b7e42 100644
--- a/llvm/test/Linker/ctors.ll
+++ b/llvm/test/Linker/ctors.ll
@@ -6,12 +6,12 @@
; Test the bitcode writer too. It used to crash.
; RUN: llvm-link %s %p/Inputs/ctors.ll -o %t.bc
-; ALL: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }]
+; ALL: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @f, ptr @v }]
@v = weak global i8 0
; CHECK1: @v = weak global i8 0
; CHECK2: @v = weak global i8 1
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @f, ptr @v }]
define weak void @f() {
ret void
diff --git a/llvm/test/Linker/ctors4.ll b/llvm/test/Linker/ctors4.ll
index c4500841f174c..4f4942131db0d 100644
--- a/llvm/test/Linker/ctors4.ll
+++ b/llvm/test/Linker/ctors4.ll
@@ -8,7 +8,7 @@ define void @f() {
; entry.
@v = linkonce global i8 42
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @f, ptr @v }]
-; CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }]
+; CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @f, ptr @v }]
diff --git a/llvm/test/Linker/distinct.ll b/llvm/test/Linker/distinct.ll
index d88d8ae16d9ad..f21c51ce8b54f 100644
--- a/llvm/test/Linker/distinct.ll
+++ b/llvm/test/Linker/distinct.ll
@@ -7,33 +7,33 @@
; CHECK: @global = linkonce global i32 0
@global = linkonce global i32 0
; Add an external reference to @global so that it gets linked in.
- at alias = alias i32, i32* @global
+ at alias = alias i32, ptr @global
; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !0, !1, !2, !9, !10, !11, !12, !13, !14}
!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
; CHECK: !0 = !{}
; CHECK-NEXT: !1 = !{!0}
-; CHECK-NEXT: !2 = !{i32* @global}
+; CHECK-NEXT: !2 = !{ptr @global}
; CHECK-NEXT: !3 = distinct !{}
; CHECK-NEXT: !4 = distinct !{!0}
-; CHECK-NEXT: !5 = distinct !{i32* @global}
+; CHECK-NEXT: !5 = distinct !{ptr @global}
; CHECK-NEXT: !6 = !{!3}
; CHECK-NEXT: !7 = !{!4}
; CHECK-NEXT: !8 = !{!5}
; CHECK-NEXT: !9 = distinct !{}
; CHECK-NEXT: !10 = distinct !{!0}
-; CHECK-NEXT: !11 = distinct !{i32* @global}
+; CHECK-NEXT: !11 = distinct !{ptr @global}
; CHECK-NEXT: !12 = !{!9}
; CHECK-NEXT: !13 = !{!10}
; CHECK-NEXT: !14 = !{!11}
; CHECK-NOT: !
!0 = !{}
!1 = !{!0}
-!2 = !{i32* @global}
+!2 = !{ptr @global}
!3 = distinct !{}
!4 = distinct !{!0}
-!5 = distinct !{i32* @global}
+!5 = distinct !{ptr @global}
!6 = !{!3}
!7 = !{!4}
!8 = !{!5}
diff --git a/llvm/test/Linker/elementtype-struct-1.ll b/llvm/test/Linker/elementtype-struct-1.ll
index 464636c5b577f..d9bb7491d9c37 100644
--- a/llvm/test/Linker/elementtype-struct-1.ll
+++ b/llvm/test/Linker/elementtype-struct-1.ll
@@ -3,15 +3,15 @@
; Check that the attribute for elementtype matches when linking.
; CHECK: define void @struct_elementtype_2
-; CHECK: call %struct* @llvm.preserve.array.access.index.p0s_structs.p0s_structs(%struct* elementtype(%struct) null, i32 0, i32 0)
+; CHECK: call ptr @llvm.preserve.array.access.index.p0.p0(ptr elementtype(%struct) null, i32 0, i32 0)
; CHECK: define void @struct_elementtype
-; CHECK: call %struct* @llvm.preserve.array.access.index.p0s_structs.p0s_structs(%struct* elementtype(%struct) null, i32 0, i32 0)
+; CHECK: call ptr @llvm.preserve.array.access.index.p0.p0(ptr elementtype(%struct) null, i32 0, i32 0)
%struct = type {i32, i8}
define void @struct_elementtype() {
- call %struct* @llvm.preserve.array.access.index.p0s_structs.p0s_structs(%struct* elementtype(%struct) null, i32 0, i32 0)
+ call ptr @llvm.preserve.array.access.index.p0.p0(ptr elementtype(%struct) null, i32 0, i32 0)
ret void
}
-declare %struct* @llvm.preserve.array.access.index.p0s_structs.p0s_structs(%struct*, i32, i32)
+declare ptr @llvm.preserve.array.access.index.p0.p0(ptr, i32, i32)
diff --git a/llvm/test/Linker/empty-swift.ll b/llvm/test/Linker/empty-swift.ll
index 9b5ce1e106dea..2d47efbffb889 100644
--- a/llvm/test/Linker/empty-swift.ll
+++ b/llvm/test/Linker/empty-swift.ll
@@ -7,10 +7,9 @@
target triple = "x86_64-apple-macosx10.15.0"
@__swift_reflection_version = linkonce_odr hidden constant i16 3
- at llvm.used = appending global [1 x i8*] [i8* bitcast (i16* @__swift_reflection_version to i8*)], section "llvm.metadata", align 8
+ at llvm.used = appending global [1 x ptr] [ptr @__swift_reflection_version], section "llvm.metadata", align 8
-define i32 @main(i32 %0, i8** %1) #0 {
- %3 = bitcast i8** %1 to i8*
+define i32 @main(i32 %0, ptr %1) #0 {
ret i32 0
}
@@ -34,7 +33,7 @@ attributes #0 = { "frame-pointer"="all" "target-cpu"="penryn" "target-features"=
!10 = !{!"-lswiftSwiftOnoneSupport"}
!11 = !{!"-lswiftCore"}
!12 = !{!"-lobjc"}
-!13 = !{[1 x i8*]* @llvm.used, null, null, i1 false, i1 true}
+!13 = !{ptr @llvm.used, null, null, i1 false, i1 true}
; CHECK: !{{[0-9]+}} = !{i32 1, !"Objective-C Garbage Collection", i8 0}
; CHECK: !{{[0-9]+}} = !{i32 1, !"Swift ABI Version", i32 7}
diff --git a/llvm/test/Linker/func-attrs-a.ll b/llvm/test/Linker/func-attrs-a.ll
index 55b27aae79f6a..3f1ab40dd0719 100644
--- a/llvm/test/Linker/func-attrs-a.ll
+++ b/llvm/test/Linker/func-attrs-a.ll
@@ -1,14 +1,14 @@
; RUN: llvm-link %s %p/func-attrs-b.ll -S -o - | FileCheck %s
; PR2382
-; CHECK: call void @check0(%struct.S0* sret(%struct.S0) null, %struct.S0* byval(%struct.S0) align 4 null, %struct.S0* align 4 null, %struct.S0* byval(%struct.S0) align 4 null)
-; CHECK: define void @check0(%struct.S0* sret(%struct.S0) %agg.result, %struct.S0* byval(%struct.S0) %arg0, %struct.S0* %arg1, %struct.S0* byval(%struct.S0) %arg2)
+; CHECK: call void @check0(ptr sret(%struct.S0) null, ptr byval(%struct.S0) align 4 null, ptr align 4 null, ptr byval(%struct.S0) align 4 null)
+; CHECK: define void @check0(ptr sret(%struct.S0) %agg.result, ptr byval(%struct.S0) %arg0, ptr %arg1, ptr byval(%struct.S0) %arg2)
%struct.S0 = type <{ i8, i8, i8, i8 }>
define void @a() {
- call void @check0(%struct.S0* sret(%struct.S0) null, %struct.S0* byval(%struct.S0) align 4 null, %struct.S0* align 4 null, %struct.S0* byval(%struct.S0) align 4 null)
+ call void @check0(ptr sret(%struct.S0) null, ptr byval(%struct.S0) align 4 null, ptr align 4 null, ptr byval(%struct.S0) align 4 null)
ret void
}
-declare void @check0(%struct.S0*, %struct.S0*, %struct.S0*, %struct.S0*)
+declare void @check0(ptr, ptr, ptr, ptr)
diff --git a/llvm/test/Linker/func-attrs-b.ll b/llvm/test/Linker/func-attrs-b.ll
index beb373207c1bb..7ea12db48837c 100644
--- a/llvm/test/Linker/func-attrs-b.ll
+++ b/llvm/test/Linker/func-attrs-b.ll
@@ -3,6 +3,6 @@
%struct.S0 = type <{ i8, i8, i8, i8 }>
-define void @check0(%struct.S0* sret(%struct.S0) %agg.result, %struct.S0* byval(%struct.S0) %arg0, %struct.S0* %arg1, %struct.S0* byval(%struct.S0) %arg2) {
+define void @check0(ptr sret(%struct.S0) %agg.result, ptr byval(%struct.S0) %arg0, ptr %arg1, ptr byval(%struct.S0) %arg2) {
ret void
}
diff --git a/llvm/test/Linker/funcimport_appending_global.ll b/llvm/test/Linker/funcimport_appending_global.ll
index 3284ef255be80..456a929cac4f7 100644
--- a/llvm/test/Linker/funcimport_appending_global.ll
+++ b/llvm/test/Linker/funcimport_appending_global.ll
@@ -9,7 +9,7 @@
; CHECK-NOT: @llvm.global_ctors = {{.*}}@foo
declare void @f()
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* null}]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @f, ptr null}]
define i32 @main() {
entry:
diff --git a/llvm/test/Linker/funcimport_comdat.ll b/llvm/test/Linker/funcimport_comdat.ll
index ecb28a2a20004..4f18646a29cfa 100644
--- a/llvm/test/Linker/funcimport_comdat.ll
+++ b/llvm/test/Linker/funcimport_comdat.ll
@@ -22,7 +22,7 @@ define void @comdat1_func1() comdat($comdat1) {
}
$comdat2 = comdat any
- at comdat2_alias = alias void (), void ()* @comdat2_func1
+ at comdat2_alias = alias void (), ptr @comdat2_func1
define internal void @comdat2_func1() comdat($comdat2) {
ret void
}
diff --git a/llvm/test/Linker/globalorder.ll b/llvm/test/Linker/globalorder.ll
index caab97a6ba86b..41ed3b2e167dd 100644
--- a/llvm/test/Linker/globalorder.ll
+++ b/llvm/test/Linker/globalorder.ll
@@ -5,15 +5,15 @@
@var1 = internal global i32 0, align 4
@var2 = internal global i32 0, align 4
- at var3 = global i32* @var1, align 4
- at var4 = global i32* @var2, align 4
+ at var3 = global ptr @var1, align 4
+ at var4 = global ptr @var2, align 4
define i32 @foo() {
entry:
- %0 = load i32*, i32** @var3, align 4
- %1 = load i32, i32* %0, align 4
- %2 = load i32*, i32** @var4, align 4
- %3 = load i32, i32* %2, align 4
+ %0 = load ptr, ptr @var3, align 4
+ %1 = load i32, ptr %0, align 4
+ %2 = load ptr, ptr @var4, align 4
+ %3 = load i32, ptr %2, align 4
%add = add nsw i32 %3, %1
ret i32 %add
}
diff --git a/llvm/test/Linker/inalloca-types.ll b/llvm/test/Linker/inalloca-types.ll
index 36cc9c3f7ef4a..41400d84c0cfe 100644
--- a/llvm/test/Linker/inalloca-types.ll
+++ b/llvm/test/Linker/inalloca-types.ll
@@ -3,23 +3,23 @@
%a = type { i64 }
%struct = type { i32, i8 }
-; CHECK-LABEL: define void @f(%a* inalloca(%a) %0)
-define void @f(%a* inalloca(%a)) {
+; CHECK-LABEL: define void @f(ptr inalloca(%a) %0)
+define void @f(ptr inalloca(%a)) {
ret void
}
; CHECK-LABEL: define void @bar(
-; CHECK: call void @foo(%struct* inalloca(%struct) %ptr)
+; CHECK: call void @foo(ptr inalloca(%struct) %ptr)
define void @bar() {
%ptr = alloca inalloca %struct
- call void @foo(%struct* inalloca(%struct) %ptr)
+ call void @foo(ptr inalloca(%struct) %ptr)
ret void
}
-; CHECK-LABEL: define void @g(%a* inalloca(%a) %0)
+; CHECK-LABEL: define void @g(ptr inalloca(%a) %0)
-; CHECK-LABEL: define void @foo(%struct* inalloca(%struct) %a)
-; CHECK-NEXT: call void @baz(%struct* inalloca(%struct) %a)
-declare void @foo(%struct* inalloca(%struct) %a)
+; CHECK-LABEL: define void @foo(ptr inalloca(%struct) %a)
+; CHECK-NEXT: call void @baz(ptr inalloca(%struct) %a)
+declare void @foo(ptr inalloca(%struct) %a)
-; CHECK: declare void @baz(%struct* inalloca(%struct))
+; CHECK: declare void @baz(ptr inalloca(%struct))
diff --git a/llvm/test/Linker/inlineasm.ll b/llvm/test/Linker/inlineasm.ll
index de1902e7e970c..ec88d4b1f0dfb 100644
--- a/llvm/test/Linker/inlineasm.ll
+++ b/llvm/test/Linker/inlineasm.ll
@@ -7,11 +7,11 @@ target triple = "i386-apple-macosx10.6.8"
; rdar://9776316 - type remapping needed for inline asm blobs.
-%T = type { [18 x i32], [4 x i8*] }
+%T = type { [18 x i32], [4 x ptr] }
-define void @f(%T* %x) nounwind ssp {
+define void @f(ptr %x) nounwind ssp {
entry:
-call void asm sideeffect "", "=*m"(%T* elementtype(%T) %x) nounwind
+call void asm sideeffect "", "=*m"(ptr elementtype(%T) %x) nounwind
unreachable
}
diff --git a/llvm/test/Linker/link-flags.ll b/llvm/test/Linker/link-flags.ll
index 4e8eaa62dd78f..bba884a26c28c 100644
--- a/llvm/test/Linker/link-flags.ll
+++ b/llvm/test/Linker/link-flags.ll
@@ -9,7 +9,7 @@ CI-LABEL: @X = internal global i32 5
CU-LABEL:@U = global i32 6
CI-LABEL:@U = internal global i32 6
CN-NOT:@U
-DI-LABEL: @llvm.used = appending global [2 x i8*] [i8* @Y, i8* bitcast (i64 ()* @foo to i8*)], section "llvm.metadata"
+DI-LABEL: @llvm.used = appending global [2 x ptr] [ptr @Y, ptr @foo], section "llvm.metadata"
DI-LABEL: @Y = global i8 42
B-LABEL: define void @bar() {
diff --git a/llvm/test/Linker/link-global-to-func.ll b/llvm/test/Linker/link-global-to-func.ll
index f7adde94c1399..0bc737466b1c1 100644
--- a/llvm/test/Linker/link-global-to-func.ll
+++ b/llvm/test/Linker/link-global-to-func.ll
@@ -1,14 +1,14 @@
; RUN: llvm-as %s -o %t1.bc
-; RUN: echo "declare void @__eprintf(i8*, i8*, i32, i8*) noreturn define void @foo() { tail call void @__eprintf( i8* undef, i8* undef, i32 4, i8* null ) noreturn nounwind unreachable }" | llvm-as -o %t2.bc
+; RUN: echo "declare void @__eprintf(ptr, ptr, i32, ptr) noreturn define void @foo() { tail call void @__eprintf( ptr undef, ptr undef, i32 4, ptr null ) noreturn nounwind unreachable }" | llvm-as -o %t2.bc
; RUN: llvm-link %t2.bc %t1.bc -S | FileCheck %s
; RUN: llvm-link %t1.bc %t2.bc -S | FileCheck %s
; CHECK: __eprintf
; rdar://6072702
- at __eprintf = external global i8* ; <i8**> [#uses=1]
+ at __eprintf = external global ptr ; <ptr> [#uses=1]
-define i8* @test() {
- %A = load i8*, i8** @__eprintf ; <i8*> [#uses=1]
- ret i8* %A
+define ptr @test() {
+ %A = load ptr, ptr @__eprintf ; <ptr> [#uses=1]
+ ret ptr %A
}
diff --git a/llvm/test/Linker/lto-attributes.ll b/llvm/test/Linker/lto-attributes.ll
index e55029a0e2be6..8c2f994d3fb19 100644
--- a/llvm/test/Linker/lto-attributes.ll
+++ b/llvm/test/Linker/lto-attributes.ll
@@ -1,9 +1,9 @@
; RUN: llvm-link -S %s -o - | FileCheck %s
-; CHECK-DAG: @foo = private externally_initialized global i8* null
- at foo = private externally_initialized global i8* null
+; CHECK-DAG: @foo = private externally_initialized global ptr null
+ at foo = private externally_initialized global ptr null
- at useFoo = global i8** @foo
+ at useFoo = global ptr @foo
; CHECK-DAG: @array = appending global [7 x i8] c"abcdefg", align 1
@array = appending global [7 x i8] c"abcdefg", align 1
diff --git a/llvm/test/Linker/metadata-a.ll b/llvm/test/Linker/metadata-a.ll
index 78715c69bd5c7..0e18b8ac77e73 100644
--- a/llvm/test/Linker/metadata-a.ll
+++ b/llvm/test/Linker/metadata-a.ll
@@ -4,12 +4,12 @@
; CHECK: ret void, !attach !0
; CHECK: define void @goo(i32 %b)
; CHECK: ret void, !attach !1
-; CHECK: !0 = !{i32 524334, void (i32)* @foo}
-; CHECK: !1 = !{i32 524334, void (i32)* @goo}
+; CHECK: !0 = !{i32 524334, ptr @foo}
+; CHECK: !1 = !{i32 524334, ptr @goo}
define void @foo(i32 %a) nounwind {
entry:
ret void, !attach !0
}
-!0 = !{i32 524334, void (i32)* @foo}
+!0 = !{i32 524334, ptr @foo}
diff --git a/llvm/test/Linker/metadata-attach.ll b/llvm/test/Linker/metadata-attach.ll
index 6b6c8dd9ed354..a3d3415eb38a2 100644
--- a/llvm/test/Linker/metadata-attach.ll
+++ b/llvm/test/Linker/metadata-attach.ll
@@ -22,7 +22,7 @@
; CHECK-LINKED1: define void @f1() !attach !0 {
define void @f1() !attach !0 {
call void @f2()
- store i32 0, i32* @g2
+ store i32 0, ptr @g2
ret void
}
diff --git a/llvm/test/Linker/metadata-b.ll b/llvm/test/Linker/metadata-b.ll
index fd2fd28e1d994..411f688af1144 100644
--- a/llvm/test/Linker/metadata-b.ll
+++ b/llvm/test/Linker/metadata-b.ll
@@ -6,4 +6,4 @@ entry:
ret void, !attach !0
}
-!0 = !{i32 524334, void (i32)* @goo}
+!0 = !{i32 524334, ptr @goo}
diff --git a/llvm/test/Linker/metadata-global.ll b/llvm/test/Linker/metadata-global.ll
index 56d77e128bde8..219ed944e3aa7 100644
--- a/llvm/test/Linker/metadata-global.ll
+++ b/llvm/test/Linker/metadata-global.ll
@@ -3,9 +3,9 @@
; CHECK-DAG: @a = global i32 0
; CHECK-DAG: @b = global i32 0, !associated !0
-; CHECK-DAG: !0 = !{i32* @b}
+; CHECK-DAG: !0 = !{ptr @b}
@a = global i32 0
@b = global i32 0, !associated !0
-!0 = !{i32* @b}
+!0 = !{ptr @b}
diff --git a/llvm/test/Linker/metadata-with-global-value-operand.ll b/llvm/test/Linker/metadata-with-global-value-operand.ll
index fb4c01a721e74..13fc8791b54e4 100644
--- a/llvm/test/Linker/metadata-with-global-value-operand.ll
+++ b/llvm/test/Linker/metadata-with-global-value-operand.ll
@@ -1,6 +1,6 @@
; RUN: llvm-link -S -o - %s %S/Inputs/metadata-with-global-value-operand.ll | FileCheck %s
; This test confirms that the !{null} from the second module doesn't get mapped
-; onto the abandoned !{i1* @var} node from this module.
+; onto the abandoned !{ptr @var} node from this module.
; CHECK: @var = global
@var = global i1 false
@@ -9,6 +9,6 @@
; CHECK: !named.null = !{!1}
!named.vars = !{!0}
-; CHECK: !0 = !{i1* @var}
+; CHECK: !0 = !{ptr @var}
; CHECK: !1 = !{null}
-!0 = !{i1* @var}
+!0 = !{ptr @var}
diff --git a/llvm/test/Linker/null_mapping_constant.ll b/llvm/test/Linker/null_mapping_constant.ll
index a7e7770dd2784..bb6a2ba9a30da 100644
--- a/llvm/test/Linker/null_mapping_constant.ll
+++ b/llvm/test/Linker/null_mapping_constant.ll
@@ -6,6 +6,6 @@
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"
- at foo = external unnamed_addr constant { [4 x i8*], [32 x i8] }, align 32
+ at foo = external unnamed_addr constant { [4 x ptr], [32 x i8] }, align 32
!llvm.bitsets = !{!0}
-!0 = !{!"foo", [4 x i8*]* getelementptr inbounds ({ [4 x i8*], [32 x i8] }, { [4 x i8*], [32 x i8] }* @foo, i32 0, i32 0), i64 16}
+!0 = !{!"foo", ptr getelementptr inbounds ({ [4 x ptr], [32 x i8] }, ptr @foo, i32 0, i32 0), i64 16}
diff --git a/llvm/test/Linker/odr-lambda-1.ll b/llvm/test/Linker/odr-lambda-1.ll
index 90611b8dc26a3..4b7c7729deb1e 100644
--- a/llvm/test/Linker/odr-lambda-1.ll
+++ b/llvm/test/Linker/odr-lambda-1.ll
@@ -43,7 +43,7 @@ define linkonce_odr void @_Z12consumeError5Error() #0 !dbg !13 {
entry:
%Err = alloca %class.Error, align 1
%agg.tmp = alloca %class.anon, align 1
- call void @llvm.dbg.declare(metadata %class.Error* %Err, metadata !17, metadata !DIExpression()), !dbg !18
+ call void @llvm.dbg.declare(metadata ptr %Err, metadata !17, metadata !DIExpression()), !dbg !18
call void @_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_(), !dbg !19
ret void, !dbg !20
}
@@ -55,7 +55,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
define linkonce_odr void @_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_() #0 !dbg !21 {
entry:
%Handlers = alloca %class.anon, align 1
- call void @llvm.dbg.declare(metadata %class.anon* %Handlers, metadata !27, metadata !DIExpression()), !dbg !28
+ call void @llvm.dbg.declare(metadata ptr %Handlers, metadata !27, metadata !DIExpression()), !dbg !28
ret void, !dbg !29
}
diff --git a/llvm/test/Linker/only-needed-compiler-used.ll b/llvm/test/Linker/only-needed-compiler-used.ll
index b15178bda781b..4e50e7347610a 100644
--- a/llvm/test/Linker/only-needed-compiler-used.ll
+++ b/llvm/test/Linker/only-needed-compiler-used.ll
@@ -6,7 +6,7 @@
; Empty destination module!
-; CHECK-DAG: @llvm.compiler.used = appending global [2 x i8*] [i8* @used1, i8* bitcast (i32* @used2 to i8*)], section "llvm.metadata"
+; CHECK-DAG: @llvm.compiler.used = appending global [2 x ptr] [ptr @used1, ptr @used2], section "llvm.metadata"
; NO-INTERNALIZE-DAG: @used1 = global i8 4
; INTERNALIZE-DAG: @used1 = internal global i8 4
; NO-INTERNALIZE-DAG: @used2 = global i32 123
diff --git a/llvm/test/Linker/only-needed-ctors1.ll b/llvm/test/Linker/only-needed-ctors1.ll
index 634da97f4180f..acedcabb396ea 100644
--- a/llvm/test/Linker/only-needed-ctors1.ll
+++ b/llvm/test/Linker/only-needed-ctors1.ll
@@ -6,7 +6,7 @@
; Empty destination module!
-; CHECK: @llvm.global_ctors = appending global [2 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 2, void ()* @ctor1, i8* null }, { i32, void ()*, i8* } { i32 7, void ()* @ctor2, i8* null }]
+; CHECK: @llvm.global_ctors = appending global [2 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 2, ptr @ctor1, ptr null }, { i32, ptr, ptr } { i32 7, ptr @ctor2, ptr null }]
; CHECK: define internal void @ctor1()
; CHECK: define internal void @ctor2()
; NO-INTERNALIZE: define void @func1()
diff --git a/llvm/test/Linker/only-needed-ctors2.ll b/llvm/test/Linker/only-needed-ctors2.ll
index 27a01db5e9fd7..ec837d8f264be 100644
--- a/llvm/test/Linker/only-needed-ctors2.ll
+++ b/llvm/test/Linker/only-needed-ctors2.ll
@@ -13,11 +13,11 @@ define internal void @ctor1() {
ret void
}
- at llvm.global_ctors = appending global[1 x{i32, void() *, i8 * }] [
- {i32, void() *, i8 * } { i32 4, void() *@ctor1, i8 *null}]
+ at llvm.global_ctors = appending global[1 x{i32, ptr, ptr }] [
+ {i32, ptr, ptr } { i32 4, ptr @ctor1, ptr null}]
-; CHECK: @llvm.global_ctors = appending global [3 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 4, void ()* @ctor1, i8* null }, { i32, void ()*, i8* } { i32 2, void ()* @ctor1.2, i8* null }, { i32, void ()*, i8* } { i32 7, void ()* @ctor2, i8* null }]
+; CHECK: @llvm.global_ctors = appending global [3 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 4, ptr @ctor1, ptr null }, { i32, ptr, ptr } { i32 2, ptr @ctor1.2, ptr null }, { i32, ptr, ptr } { i32 7, ptr @ctor2, ptr null }]
; CHECK: define internal void @ctor1()
; CHECK: define void @foo()
; CHECK: define internal void @ctor1.{{[0-9]+}}()
diff --git a/llvm/test/Linker/only-needed-dtors1.ll b/llvm/test/Linker/only-needed-dtors1.ll
index 2ab49c9610208..158f603beff32 100644
--- a/llvm/test/Linker/only-needed-dtors1.ll
+++ b/llvm/test/Linker/only-needed-dtors1.ll
@@ -6,7 +6,7 @@
; Empty destination module!
-; CHECK: @llvm.global_dtors = appending global [2 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 2, void ()* @dtor1, i8* null }, { i32, void ()*, i8* } { i32 7, void ()* @dtor2, i8* null }]
+; CHECK: @llvm.global_dtors = appending global [2 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 2, ptr @dtor1, ptr null }, { i32, ptr, ptr } { i32 7, ptr @dtor2, ptr null }]
; CHECK: define internal void @dtor1()
; CHECK: define internal void @dtor2()
; NO-INTERNALIZE: define void @func1()
diff --git a/llvm/test/Linker/only-needed-dtors2.ll b/llvm/test/Linker/only-needed-dtors2.ll
index e9092975fed3e..f6467f579a7ea 100644
--- a/llvm/test/Linker/only-needed-dtors2.ll
+++ b/llvm/test/Linker/only-needed-dtors2.ll
@@ -13,11 +13,11 @@ define internal void @dtor1() {
ret void
}
- at llvm.global_dtors = appending global[1 x{i32, void() *, i8 * }] [
- {i32, void() *, i8 * } { i32 4, void() *@dtor1, i8 *null}]
+ at llvm.global_dtors = appending global[1 x{i32, ptr, ptr }] [
+ {i32, ptr, ptr } { i32 4, ptr @dtor1, ptr null}]
-; CHECK: @llvm.global_dtors = appending global [3 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 4, void ()* @dtor1, i8* null }, { i32, void ()*, i8* } { i32 2, void ()* @dtor1.2, i8* null }, { i32, void ()*, i8* } { i32 7, void ()* @dtor2, i8* null }]
+; CHECK: @llvm.global_dtors = appending global [3 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 4, ptr @dtor1, ptr null }, { i32, ptr, ptr } { i32 2, ptr @dtor1.2, ptr null }, { i32, ptr, ptr } { i32 7, ptr @dtor2, ptr null }]
; CHECK: define internal void @dtor1()
; CHECK: define void @foo()
; CHECK: define internal void @dtor1.{{[0-9]+}}()
diff --git a/llvm/test/Linker/only-needed-named-metadata.ll b/llvm/test/Linker/only-needed-named-metadata.ll
index 90e24ceaf9868..553f6d4d60cad 100644
--- a/llvm/test/Linker/only-needed-named-metadata.ll
+++ b/llvm/test/Linker/only-needed-named-metadata.ll
@@ -29,10 +29,10 @@
define i32 @foo() { ret i32 7 }
define i32 @unused() { ret i32 8 }
define linkonce_odr hidden i32 @unused_linkonce() { ret i32 8 }
- at linkoncealias = alias void (...), bitcast (void ()* @linkoncefunc2 to void (...)*)
+ at linkoncealias = alias void (...), ptr @linkoncefunc2
- at weakalias = weak alias void (...), bitcast (void ()* @globalfunc1 to void (...)*)
- at analias = alias void (...), bitcast (void ()* @globalfunc2 to void (...)*)
+ at weakalias = weak alias void (...), ptr @globalfunc1
+ at analias = alias void (...), ptr @globalfunc2
define void @globalfunc1() #0 {
entry:
@@ -51,10 +51,10 @@ entry:
}
!llvm.named = !{!0, !1, !2, !3, !4, !5, !6}
-!0 = !{i32 ()* @unused}
-!1 = !{i32* @U}
-!2 = !{i32 ()* @unused_linkonce}
-!3 = !{i32* @U_linkonce}
-!4 = !{void (...)* @weakalias}
-!5 = !{void (...)* @analias}
-!6 = !{void (...)* @linkoncealias}
+!0 = !{ptr @unused}
+!1 = !{ptr @U}
+!2 = !{ptr @unused_linkonce}
+!3 = !{ptr @U_linkonce}
+!4 = !{ptr @weakalias}
+!5 = !{ptr @analias}
+!6 = !{ptr @linkoncealias}
diff --git a/llvm/test/Linker/only-needed-used.ll b/llvm/test/Linker/only-needed-used.ll
index 7eff3b5db6645..1a9ac95eb7add 100644
--- a/llvm/test/Linker/only-needed-used.ll
+++ b/llvm/test/Linker/only-needed-used.ll
@@ -6,6 +6,6 @@
; Empty destination module!
-; CHECK-DAG: @llvm.used = appending global [2 x i8*] [i8* @used1, i8* bitcast (i32* @used2 to i8*)], section "llvm.metadata"
+; CHECK-DAG: @llvm.used = appending global [2 x ptr] [ptr @used1, ptr @used2], section "llvm.metadata"
; CHECK-DAG: @used1 = global i8 4
; CHECK-DAG: @used2 = global i32 123
diff --git a/llvm/test/Linker/opaque.ll b/llvm/test/Linker/opaque.ll
index 6fd1ae90d4f46..7d2c49af7797f 100644
--- a/llvm/test/Linker/opaque.ll
+++ b/llvm/test/Linker/opaque.ll
@@ -1,8 +1,8 @@
; RUN: llvm-link %p/opaque.ll %p/Inputs/opaque.ll -S -o - | FileCheck %s
; CHECK-DAG: %A = type {}
-; CHECK-DAG: %B = type { %C, %C, %B* }
-; CHECK-DAG: %B.1 = type { %D, %E, %B.1* }
+; CHECK-DAG: %B = type { %C, %C, ptr }
+; CHECK-DAG: %B.1 = type { %D, %E, ptr }
; CHECK-DAG: %C = type { %A }
; CHECK-DAG: %D = type { %E }
; CHECK-DAG: %E = type opaque
@@ -11,15 +11,15 @@
; CHECK-DAG: @g2 = external global %A
; CHECK-DAG: @g3 = external global %B.1
-; CHECK-DAG: getelementptr %A, %A* null, i32 0
+; CHECK-DAG: getelementptr %A, ptr null, i32 0
%A = type opaque
-%B = type { %C, %C, %B* }
+%B = type { %C, %C, ptr }
%C = type { %A }
@g1 = external global %B
-define %B* @use_g1() {
- ret %B* @g1
+define ptr @use_g1() {
+ ret ptr @g1
}
diff --git a/llvm/test/Linker/override-
diff erent-linkage.ll b/llvm/test/Linker/override-
diff erent-linkage.ll
index 19961f2486a02..791168debf2f7 100644
--- a/llvm/test/Linker/override-
diff erent-linkage.ll
+++ b/llvm/test/Linker/override-
diff erent-linkage.ll
@@ -12,7 +12,7 @@ entry:
}
; Function Attrs: nounwind ssp uwtable
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
entry:
%a = call i32 @foo(i32 2)
ret i32 %a
diff --git a/llvm/test/Linker/override-with-internal-linkage-2.ll b/llvm/test/Linker/override-with-internal-linkage-2.ll
index 45b131fe57974..0e35087804f2f 100644
--- a/llvm/test/Linker/override-with-internal-linkage-2.ll
+++ b/llvm/test/Linker/override-with-internal-linkage-2.ll
@@ -16,7 +16,7 @@ entry:
; CHECK-NEXT: ret i32 4
; Function Attrs: nounwind ssp uwtable
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
entry:
%a = call i32 @foo(i32 2)
ret i32 %a
diff --git a/llvm/test/Linker/override-with-internal-linkage.ll b/llvm/test/Linker/override-with-internal-linkage.ll
index 59bd214c204f8..f5477ef79e5bb 100644
--- a/llvm/test/Linker/override-with-internal-linkage.ll
+++ b/llvm/test/Linker/override-with-internal-linkage.ll
@@ -4,7 +4,7 @@
; CHECK-LABEL: define i32 @main(
; CHECK-NEXT: entry:
; CHECK-NEXT: call i32 @foo.2(
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
entry:
%a = call i32 @foo(i32 2)
ret i32 %a
diff --git a/llvm/test/Linker/override.ll b/llvm/test/Linker/override.ll
index 015cb4c382a9e..8eadcd4cc12de 100644
--- a/llvm/test/Linker/override.ll
+++ b/llvm/test/Linker/override.ll
@@ -12,7 +12,7 @@ entry:
}
; Function Attrs: nounwind ssp uwtable
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
entry:
%a = call i32 @foo(i32 2)
ret i32 %a
diff --git a/llvm/test/Linker/partial-type-refinement-link.ll b/llvm/test/Linker/partial-type-refinement-link.ll
index 0c921110f9e34..cc34f63535cf4 100644
--- a/llvm/test/Linker/partial-type-refinement-link.ll
+++ b/llvm/test/Linker/partial-type-refinement-link.ll
@@ -1,20 +1,20 @@
; This file is used by first.ll, so it doesn't actually do anything itself
; RUN: true
-%AnalysisResolver = type { i8, %PMDataManager* }
-%"DenseMap<P*,AU*>" = type { i64, %"pair<P*,AU*>"*, i64, i64 }
-%PMDataManager = type { i8, %PMTopLevelManager*, i8, i8, i8, i8, i8, i64, i8 }
+%AnalysisResolver = type { i8, ptr }
+%"DenseMap<P*,AU*>" = type { i64, ptr, i64, i64 }
+%PMDataManager = type { i8, ptr, i8, i8, i8, i8, i8, i64, i8 }
%PMTopLevelManager = type { i8, i8, i8, i8, i8, i8, i8, i8, %"DenseMap<P*,AU*>" }
-%P = type { i8, %AnalysisResolver*, i64 }
-%PI = type { i8, i8, i8, i8, i8, i8, %"vector<const PI*>", %P* }
-%"SmallVImpl<const PI*>" = type { i8, %PI* }
+%P = type { i8, ptr, i64 }
+%PI = type { i8, i8, i8, i8, i8, i8, %"vector<const PI*>", ptr }
+%"SmallVImpl<const PI*>" = type { i8, ptr }
%"_V_base<const PI*>" = type { %"_V_base<const PI*>::_V_impl" }
-%"_V_base<const PI*>::_V_impl" = type { %PI*, i8, i8 }
+%"_V_base<const PI*>::_V_impl" = type { ptr, i8, i8 }
%"pair<P*,AU*>" = type opaque
%"vector<const PI*>" = type { %"_V_base<const PI*>" }
-define void @f(%"SmallVImpl<const PI*>"* %this) {
+define void @f(ptr %this) {
entry:
- %x = getelementptr inbounds %"SmallVImpl<const PI*>", %"SmallVImpl<const PI*>"* %this, i64 0, i32 1
+ %x = getelementptr inbounds %"SmallVImpl<const PI*>", ptr %this, i64 0, i32 1
ret void
}
diff --git a/llvm/test/Linker/partial-type-refinement.ll b/llvm/test/Linker/partial-type-refinement.ll
index e9a645b077ea2..85433a3f4a158 100644
--- a/llvm/test/Linker/partial-type-refinement.ll
+++ b/llvm/test/Linker/partial-type-refinement.ll
@@ -1,17 +1,17 @@
; RUN: llvm-link %s %p/partial-type-refinement-link.ll -S | FileCheck %s
; PR4954
-; CHECK: load %PI*, %PI** getelementptr inbounds (%"RegisterP<LowerArrayLength>", %"RegisterP<LowerArrayLength>"* @_ZN3mvmL1XE, i64 0, i32 0, i32 6, i32 0, i32 0, i32 0), align 16
+; CHECK: load ptr, ptr getelementptr inbounds (%"RegisterP<LowerArrayLength>", ptr @_ZN3mvmL1XE, i64 0, i32 0, i32 6, i32 0, i32 0, i32 0), align 16
-%AnalysisResolver = type { i8, %PMDataManager* }
-%"DenseMap<P*,AU*>" = type { i64, %"pair<P*,AU*>"*, i64, i64 }
-%PMDataManager = type { i8, %PMTopLevelManager*, i8, i8, i8, i8, i8, i64, i8 }
+%AnalysisResolver = type { i8, ptr }
+%"DenseMap<P*,AU*>" = type { i64, ptr, i64, i64 }
+%PMDataManager = type { i8, ptr, i8, i8, i8, i8, i8, i64, i8 }
%PMTopLevelManager = type { i8, i8, i8, i8, i8, i8, i8, i8, %"DenseMap<P*,AU*>" }
-%P = type { i8, %AnalysisResolver*, i64 }
-%PI = type { i8, i8, i8, i8, i8, i8, %"vector<const PI*>", %P* }
+%P = type { i8, ptr, i64 }
+%PI = type { i8, i8, i8, i8, i8, i8, %"vector<const PI*>", ptr }
%"RegisterP<LowerArrayLength>" = type { %PI }
%"_V_base<const PI*>" = type { %"_V_base<const PI*>::_V_impl" }
-%"_V_base<const PI*>::_V_impl" = type { %PI*, i8, i8 }
+%"_V_base<const PI*>::_V_impl" = type { ptr, i8, i8 }
%"pair<P*,AU*>" = type opaque
%"vector<const PI*>" = type { %"_V_base<const PI*>" }
@@ -19,6 +19,6 @@
define void @__tcf_0() nounwind {
entry:
- %0 = load %PI*, %PI** getelementptr inbounds (%"RegisterP<LowerArrayLength>", %"RegisterP<LowerArrayLength>"* @_ZN3mvmL1XE, i64 0, i32 0, i32 6, i32 0, i32 0, i32 0), align 16
+ %0 = load ptr, ptr getelementptr inbounds (%"RegisterP<LowerArrayLength>", ptr @_ZN3mvmL1XE, i64 0, i32 0, i32 6, i32 0, i32 0, i32 0), align 16
ret void
}
diff --git a/llvm/test/Linker/pr21494.ll b/llvm/test/Linker/pr21494.ll
index 40b57cad3cf50..4d981131f217d 100644
--- a/llvm/test/Linker/pr21494.ll
+++ b/llvm/test/Linker/pr21494.ll
@@ -6,10 +6,10 @@
@g2 = linkonce_odr global i8 0
; CHECK-NOT: @g2
- at a1 = private alias i8, i8* @g1
+ at a1 = private alias i8, ptr @g1
; CHECK-NOT: @a1
- at a2 = linkonce_odr alias i8, i8* @g2
+ at a2 = linkonce_odr alias i8, ptr @g2
; CHECK-NOT: @a2
define private void @f1() {
diff --git a/llvm/test/Linker/prologuedata.ll b/llvm/test/Linker/prologuedata.ll
index 3015d50867e92..dba2ca8d69617 100644
--- a/llvm/test/Linker/prologuedata.ll
+++ b/llvm/test/Linker/prologuedata.ll
@@ -1,7 +1,7 @@
; RUN: llvm-link %s -S -o - | FileCheck %s
- at g1 = global void()* @f2
-; CHECK-DAG: @g1 = global void ()* @f2
+ at g1 = global ptr @f2
+; CHECK-DAG: @g1 = global ptr @f2
@p1 = global i8 42
; CHECK-DAG: @p1 = global i8 42
@@ -9,13 +9,13 @@
@p2 = internal global i8 43
; CHECK-DAG: @p2 = internal global i8 43
-define void @f1() prologue i8* @p1 {
+define void @f1() prologue ptr @p1 {
ret void
}
-; CHECK-DAG: define void @f1() prologue i8* @p1 {
+; CHECK-DAG: define void @f1() prologue ptr @p1 {
-define internal void @f2() prologue i8* @p2 {
+define internal void @f2() prologue ptr @p2 {
ret void
}
-; CHECK-DAG: define internal void @f2() prologue i8* @p2 {
+; CHECK-DAG: define internal void @f2() prologue ptr @p2 {
diff --git a/llvm/test/Linker/replaced-function-matches-first-subprogram.ll b/llvm/test/Linker/replaced-function-matches-first-subprogram.ll
index 7d40ac02f1580..084bfdfb14864 100644
--- a/llvm/test/Linker/replaced-function-matches-first-subprogram.ll
+++ b/llvm/test/Linker/replaced-function-matches-first-subprogram.ll
@@ -19,18 +19,18 @@
define i32 @_Z3foov() !dbg !4 {
entry:
%tmp = alloca %struct.Class, align 1
- %call = call i32 @_ZN5ClassIiE3fooEv(%struct.Class* %tmp), !dbg !14
+ %call = call i32 @_ZN5ClassIiE3fooEv(ptr %tmp), !dbg !14
ret i32 %call, !dbg !14
}
-; CHECK: define weak_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this){{.*}} !dbg ![[SP2:[0-9]+]] {
+; CHECK: define weak_odr i32 @_ZN5ClassIiE3fooEv(ptr %this){{.*}} !dbg ![[SP2:[0-9]+]] {
; CHECK-NOT: }
; CHECK: !dbg ![[LOC:[0-9]+]]
-define linkonce_odr i32 @_ZN5ClassIiE3fooEv(%struct.Class* %this) align 2 !dbg !7 {
+define linkonce_odr i32 @_ZN5ClassIiE3fooEv(ptr %this) align 2 !dbg !7 {
entry:
- %this.addr = alloca %struct.Class*, align 8
- store %struct.Class* %this, %struct.Class** %this.addr, align 8
- %this1 = load %struct.Class*, %struct.Class** %this.addr
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ %this1 = load ptr, ptr %this.addr
ret i32 0, !dbg !15
}
diff --git a/llvm/test/Linker/scalable-vector-type-construction.ll b/llvm/test/Linker/scalable-vector-type-construction.ll
index 6810652054b2e..69cb5aebb42a3 100644
--- a/llvm/test/Linker/scalable-vector-type-construction.ll
+++ b/llvm/test/Linker/scalable-vector-type-construction.ll
@@ -2,6 +2,6 @@
%t = type {i32, float}
; CHECK: define void @foo(<4 x
; CHECK: define void @bar(<vscale x 4 x
-define void @bar(<vscale x 4 x %t*> %x) {
+define void @bar(<vscale x 4 x ptr> %x) {
ret void
}
diff --git a/llvm/test/Linker/sret-types.ll b/llvm/test/Linker/sret-types.ll
index 4db293df7fc66..4d88269651b07 100644
--- a/llvm/test/Linker/sret-types.ll
+++ b/llvm/test/Linker/sret-types.ll
@@ -3,23 +3,23 @@
%a = type { i64 }
%struct = type { i32, i8 }
-; CHECK-LABEL: define void @f(%a* sret(%a) %0)
-define void @f(%a* sret(%a)) {
+; CHECK-LABEL: define void @f(ptr sret(%a) %0)
+define void @f(ptr sret(%a)) {
ret void
}
; CHECK-LABEL: define void @bar(
-; CHECK: call void @foo(%struct* sret(%struct) %ptr)
+; CHECK: call void @foo(ptr sret(%struct) %ptr)
define void @bar() {
%ptr = alloca %struct
- call void @foo(%struct* sret(%struct) %ptr)
+ call void @foo(ptr sret(%struct) %ptr)
ret void
}
-; CHECK-LABEL: define void @g(%a* sret(%a) %0)
+; CHECK-LABEL: define void @g(ptr sret(%a) %0)
-; CHECK-LABEL: define void @foo(%struct* sret(%struct) %a)
-; CHECK-NEXT: call void @baz(%struct* sret(%struct) %a)
-declare void @foo(%struct* sret(%struct) %a)
+; CHECK-LABEL: define void @foo(ptr sret(%struct) %a)
+; CHECK-NEXT: call void @baz(ptr sret(%struct) %a)
+declare void @foo(ptr sret(%struct) %a)
-; CHECK: declare void @baz(%struct* sret(%struct))
+; CHECK: declare void @baz(ptr sret(%struct))
diff --git a/llvm/test/Linker/type-unique-alias.ll b/llvm/test/Linker/type-unique-alias.ll
index 89e08dd593d18..a1baa2414b1e6 100644
--- a/llvm/test/Linker/type-unique-alias.ll
+++ b/llvm/test/Linker/type-unique-alias.ll
@@ -3,8 +3,8 @@
%t = type { i8 }
@g = global %t zeroinitializer
- at a = weak alias %t, %t* @g
+ at a = weak alias %t, ptr @g
; CHECK: @g = global %t zeroinitializer
; CHECK: @g2 = global %t zeroinitializer
-; CHECK: @a = weak alias %t, %t* @g
+; CHECK: @a = weak alias %t, ptr @g
diff --git a/llvm/test/Linker/type-unique-dst-types.ll b/llvm/test/Linker/type-unique-dst-types.ll
index cfcad130e6ae5..c5fcbd3f51fdb 100644
--- a/llvm/test/Linker/type-unique-dst-types.ll
+++ b/llvm/test/Linker/type-unique-dst-types.ll
@@ -22,6 +22,6 @@
%B = type { i8 }
@g3 = external global %A
-define %A* @use_g3() {
- ret %A* @g3
+define ptr @use_g3() {
+ ret ptr @g3
}
diff --git a/llvm/test/Linker/type-unique-odr-a.ll b/llvm/test/Linker/type-unique-odr-a.ll
index dce2001e83662..9a911c7f2d440 100644
--- a/llvm/test/Linker/type-unique-odr-a.ll
+++ b/llvm/test/Linker/type-unique-odr-a.ll
@@ -69,7 +69,7 @@ entry:
define internal void @_ZL3barv() #0 !dbg !19 {
entry:
%a = alloca %class.A, align 4
- call void @llvm.dbg.declare(metadata %class.A* %a, metadata !24, metadata !DIExpression()), !dbg !25
+ call void @llvm.dbg.declare(metadata ptr %a, metadata !24, metadata !DIExpression()), !dbg !25
ret void, !dbg !26
}
diff --git a/llvm/test/Linker/type-unique-odr-b.ll b/llvm/test/Linker/type-unique-odr-b.ll
index 7992d691a430e..0526b2a6dba94 100644
--- a/llvm/test/Linker/type-unique-odr-b.ll
+++ b/llvm/test/Linker/type-unique-odr-b.ll
@@ -22,12 +22,12 @@
%class.A = type { i32 }
; Function Attrs: nounwind
-define void @_ZN1A6getFooEv(%class.A* %this) #0 align 2 !dbg !15 {
+define void @_ZN1A6getFooEv(ptr %this) #0 align 2 !dbg !15 {
entry:
- %this.addr = alloca %class.A*, align 8
- store %class.A* %this, %class.A** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !24, metadata !DIExpression()), !dbg !26
- %this1 = load %class.A*, %class.A** %this.addr
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !24, metadata !DIExpression()), !dbg !26
+ %this1 = load ptr, ptr %this.addr
ret void, !dbg !27
}
diff --git a/llvm/test/Linker/type-unique-simple-a.ll b/llvm/test/Linker/type-unique-simple-a.ll
index 9758fec881ecf..b29e36be64fc7 100644
--- a/llvm/test/Linker/type-unique-simple-a.ll
+++ b/llvm/test/Linker/type-unique-simple-a.ll
@@ -53,9 +53,9 @@ define void @_Z1fi(i32 %a) #0 !dbg !10 {
entry:
%a.addr = alloca i32, align 4
%t = alloca %struct.Base, align 4
- store i32 %a, i32* %a.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !15, metadata !DIExpression()), !dbg !16
- call void @llvm.dbg.declare(metadata %struct.Base* %t, metadata !17, metadata !DIExpression()), !dbg !18
+ store i32 %a, ptr %a.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !15, metadata !DIExpression()), !dbg !16
+ call void @llvm.dbg.declare(metadata ptr %t, metadata !17, metadata !DIExpression()), !dbg !18
ret void, !dbg !19
}
diff --git a/llvm/test/Linker/type-unique-simple-b.ll b/llvm/test/Linker/type-unique-simple-b.ll
index ddef8f365bbfa..6f7dd76d8d5ce 100644
--- a/llvm/test/Linker/type-unique-simple-b.ll
+++ b/llvm/test/Linker/type-unique-simple-b.ll
@@ -9,9 +9,9 @@ define void @_Z1gi(i32 %a) #0 !dbg !10 {
entry:
%a.addr = alloca i32, align 4
%t = alloca %struct.Base, align 4
- store i32 %a, i32* %a.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !18, metadata !DIExpression()), !dbg !19
- call void @llvm.dbg.declare(metadata %struct.Base* %t, metadata !20, metadata !DIExpression()), !dbg !21
+ store i32 %a, ptr %a.addr, align 4
+ call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !18, metadata !DIExpression()), !dbg !19
+ call void @llvm.dbg.declare(metadata ptr %t, metadata !20, metadata !DIExpression()), !dbg !21
ret void, !dbg !22
}
@@ -22,7 +22,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
define i32 @main() #2 !dbg !14 {
entry:
%retval = alloca i32, align 4
- store i32 0, i32* %retval
+ store i32 0, ptr %retval
call void @_Z1fi(i32 0), !dbg !23
call void @_Z1gi(i32 1), !dbg !24
ret i32 0, !dbg !25
diff --git a/llvm/test/Linker/type-unique-simple2-a.ll b/llvm/test/Linker/type-unique-simple2-a.ll
index 3ddbc3c5a6abf..1032a43fd629d 100644
--- a/llvm/test/Linker/type-unique-simple2-a.ll
+++ b/llvm/test/Linker/type-unique-simple2-a.ll
@@ -26,49 +26,47 @@
; ModuleID = 'a.cpp'
-%class.A = type { i32 (...)** }
+%class.A = type { ptr }
- at _ZTV1A = external unnamed_addr constant [4 x i8*]
+ at _ZTV1A = external unnamed_addr constant [4 x ptr]
; Function Attrs: nounwind
define i32 @_Z3barv() #0 !dbg !27 {
entry:
%tmp = alloca %class.A, align 8
- %0 = bitcast %class.A* %tmp to i8*, !dbg !38
- call void @llvm.memset.p0i8.i64(i8* align 8 %0, i8 0, i64 8, i1 false), !dbg !38
- call void @_ZN1AC1Ev(%class.A* %tmp) #1, !dbg !38
- %call = call i32 @_ZN1A6getFooEv(%class.A* %tmp), !dbg !38
+ call void @llvm.memset.p0.i64(ptr align 8 %tmp, i8 0, i64 8, i1 false), !dbg !38
+ call void @_ZN1AC1Ev(ptr %tmp) #1, !dbg !38
+ %call = call i32 @_ZN1A6getFooEv(ptr %tmp), !dbg !38
ret i32 %call, !dbg !38
}
; Function Attrs: nounwind
-declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) #1
+declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) #1
; Function Attrs: inlinehint nounwind
-define linkonce_odr void @_ZN1AC1Ev(%class.A* %this) unnamed_addr #2 align 2 !dbg !31 {
+define linkonce_odr void @_ZN1AC1Ev(ptr %this) unnamed_addr #2 align 2 !dbg !31 {
entry:
- %this.addr = alloca %class.A*, align 8
- store %class.A* %this, %class.A** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !39, metadata !DIExpression()), !dbg !41
- %this1 = load %class.A*, %class.A** %this.addr
- call void @_ZN1AC2Ev(%class.A* %this1) #1, !dbg !42
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !39, metadata !DIExpression()), !dbg !41
+ %this1 = load ptr, ptr %this.addr
+ call void @_ZN1AC2Ev(ptr %this1) #1, !dbg !42
ret void, !dbg !42
}
-declare i32 @_ZN1A6getFooEv(%class.A*)
+declare i32 @_ZN1A6getFooEv(ptr)
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #4
; Function Attrs: inlinehint nounwind
-define linkonce_odr void @_ZN1AC2Ev(%class.A* %this) unnamed_addr #2 align 2 !dbg !34 {
+define linkonce_odr void @_ZN1AC2Ev(ptr %this) unnamed_addr #2 align 2 !dbg !34 {
entry:
- %this.addr = alloca %class.A*, align 8
- store %class.A* %this, %class.A** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !44, metadata !DIExpression()), !dbg !45
- %this1 = load %class.A*, %class.A** %this.addr
- %0 = bitcast %class.A* %this1 to i8***, !dbg !46
- store i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV1A, i64 0, i64 2), i8*** %0, !dbg !46
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !44, metadata !DIExpression()), !dbg !45
+ %this1 = load ptr, ptr %this.addr
+ store ptr getelementptr inbounds ([4 x ptr], ptr @_ZTV1A, i64 0, i64 2), ptr %this1, !dbg !46
ret void, !dbg !46
}
diff --git a/llvm/test/Linker/type-unique-simple2-b.ll b/llvm/test/Linker/type-unique-simple2-b.ll
index 7c3788d0497d9..38263314de449 100644
--- a/llvm/test/Linker/type-unique-simple2-b.ll
+++ b/llvm/test/Linker/type-unique-simple2-b.ll
@@ -10,20 +10,20 @@
; target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
; target triple = "x86_64-apple-macosx10.9.0"
-%class.A = type { i32 (...)** }
+%class.A = type { ptr }
- at _ZTV1A = unnamed_addr constant [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (void (%class.A*)* @_ZN1A6setFooEv to i8*), i8* bitcast (i32 (%class.A*)* @_ZN1A6getFooEv to i8*)]
- at _ZTVN10__cxxabiv117__class_type_infoE = external global i8*
+ at _ZTV1A = unnamed_addr constant [4 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN1A6setFooEv, ptr @_ZN1A6getFooEv]
+ at _ZTVN10__cxxabiv117__class_type_infoE = external global ptr
@_ZTS1A = constant [3 x i8] c"1A\00"
- at _ZTI1A = unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) }
+ at _ZTI1A = unnamed_addr constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i64 2), ptr @_ZTS1A }
; Function Attrs: nounwind
-define void @_ZN1A6setFooEv(%class.A* %this) unnamed_addr #0 align 2 !dbg !26 {
+define void @_ZN1A6setFooEv(ptr %this) unnamed_addr #0 align 2 !dbg !26 {
entry:
- %this.addr = alloca %class.A*, align 8
- store %class.A* %this, %class.A** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !32, metadata !DIExpression()), !dbg !34
- %this1 = load %class.A*, %class.A** %this.addr
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !32, metadata !DIExpression()), !dbg !34
+ %this1 = load ptr, ptr %this.addr
ret void, !dbg !35
}
@@ -31,12 +31,12 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind
-define i32 @_ZN1A6getFooEv(%class.A* %this) unnamed_addr #0 align 2 !dbg !28 {
+define i32 @_ZN1A6getFooEv(ptr %this) unnamed_addr #0 align 2 !dbg !28 {
entry:
- %this.addr = alloca %class.A*, align 8
- store %class.A* %this, %class.A** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !36, metadata !DIExpression()), !dbg !37
- %this1 = load %class.A*, %class.A** %this.addr
+ %this.addr = alloca ptr, align 8
+ store ptr %this, ptr %this.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !36, metadata !DIExpression()), !dbg !37
+ %this1 = load ptr, ptr %this.addr
ret i32 1, !dbg !38
}
diff --git a/llvm/test/Linker/type-unique-src-type.ll b/llvm/test/Linker/type-unique-src-type.ll
index ab7322892e07d..03e890351e083 100644
--- a/llvm/test/Linker/type-unique-src-type.ll
+++ b/llvm/test/Linker/type-unique-src-type.ll
@@ -11,14 +11,14 @@
; CHECK-NEXT: %A = type { i8 }
; CHECK: @g1 = global %C.0 zeroinitializer
-; CHECK: getelementptr %C.0, %C.0* null, i64 0, i32 0, i32 0
+; CHECK: getelementptr %C.0, ptr null, i64 0, i32 0, i32 0
%A = type { i8 }
%B = type { %A }
%C = type { %B }
%C.0 = type { %B }
define void @f1() {
- getelementptr %C, %C* null, i64 0, i32 0, i32 0
+ getelementptr %C, ptr null, i64 0, i32 0, i32 0
ret void
}
@g1 = global %C.0 zeroinitializer
diff --git a/llvm/test/Linker/type-unique-type-array-a.ll b/llvm/test/Linker/type-unique-type-array-a.ll
index 323c555afc989..72a0eca372941 100644
--- a/llvm/test/Linker/type-unique-type-array-a.ll
+++ b/llvm/test/Linker/type-unique-type-array-a.ll
@@ -43,23 +43,19 @@
%struct.SA = type { i32 }
; Function Attrs: ssp uwtable
-define void @_Z4topAP1A2SA(%class.A* %a, i32 %sa.coerce) #0 !dbg !15 {
+define void @_Z4topAP1A2SA(ptr %a, i32 %sa.coerce) #0 !dbg !15 {
entry:
%sa = alloca %struct.SA, align 4
- %a.addr = alloca %class.A*, align 8
+ %a.addr = alloca ptr, align 8
%agg.tmp = alloca %struct.SA, align 4
- %coerce.dive = getelementptr %struct.SA, %struct.SA* %sa, i32 0, i32 0
- store i32 %sa.coerce, i32* %coerce.dive
- store %class.A* %a, %class.A** %a.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %a.addr, metadata !24, metadata !DIExpression()), !dbg !25
- call void @llvm.dbg.declare(metadata %struct.SA* %sa, metadata !26, metadata !DIExpression()), !dbg !27
- %0 = load %class.A*, %class.A** %a.addr, align 8, !dbg !28
- %1 = bitcast %struct.SA* %agg.tmp to i8*, !dbg !28
- %2 = bitcast %struct.SA* %sa to i8*, !dbg !28
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %1, i8* align 4 %2, i64 4, i1 false), !dbg !28
- %coerce.dive1 = getelementptr %struct.SA, %struct.SA* %agg.tmp, i32 0, i32 0, !dbg !28
- %3 = load i32, i32* %coerce.dive1, !dbg !28
- call void @_ZN1A5testAE2SA(%class.A* %0, i32 %3), !dbg !28
+ store i32 %sa.coerce, ptr %sa
+ store ptr %a, ptr %a.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !24, metadata !DIExpression()), !dbg !25
+ call void @llvm.dbg.declare(metadata ptr %sa, metadata !26, metadata !DIExpression()), !dbg !27
+ %0 = load ptr, ptr %a.addr, align 8, !dbg !28
+ call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %sa, i64 4, i1 false), !dbg !28
+ %1 = load i32, ptr %agg.tmp, !dbg !28
+ call void @_ZN1A5testAE2SA(ptr %0, i32 %1), !dbg !28
ret void, !dbg !29
}
@@ -67,21 +63,20 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind ssp uwtable
-define linkonce_odr void @_ZN1A5testAE2SA(%class.A* %this, i32 %a.coerce) #2 align 2 !dbg !20 {
+define linkonce_odr void @_ZN1A5testAE2SA(ptr %this, i32 %a.coerce) #2 align 2 !dbg !20 {
entry:
%a = alloca %struct.SA, align 4
- %this.addr = alloca %class.A*, align 8
- %coerce.dive = getelementptr %struct.SA, %struct.SA* %a, i32 0, i32 0
- store i32 %a.coerce, i32* %coerce.dive
- store %class.A* %this, %class.A** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !30, metadata !DIExpression()), !dbg !31
- call void @llvm.dbg.declare(metadata %struct.SA* %a, metadata !32, metadata !DIExpression()), !dbg !33
- %this1 = load %class.A*, %class.A** %this.addr
+ %this.addr = alloca ptr, align 8
+ store i32 %a.coerce, ptr %a
+ store ptr %this, ptr %this.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !30, metadata !DIExpression()), !dbg !31
+ call void @llvm.dbg.declare(metadata ptr %a, metadata !32, metadata !DIExpression()), !dbg !33
+ %this1 = load ptr, ptr %this.addr
ret void, !dbg !34
}
; Function Attrs: nounwind
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1) #3
+declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture readonly, i64, i1) #3
attributes #0 = { ssp uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
diff --git a/llvm/test/Linker/type-unique-type-array-b.ll b/llvm/test/Linker/type-unique-type-array-b.ll
index 6a29a8e751ff1..34a1e94e822aa 100644
--- a/llvm/test/Linker/type-unique-type-array-b.ll
+++ b/llvm/test/Linker/type-unique-type-array-b.ll
@@ -22,23 +22,19 @@
%struct.SA = type { i32 }
; Function Attrs: ssp uwtable
-define void @_Z4topBP1B2SA(%class.B* %b, i32 %sa.coerce) #0 !dbg !15 {
+define void @_Z4topBP1B2SA(ptr %b, i32 %sa.coerce) #0 !dbg !15 {
entry:
%sa = alloca %struct.SA, align 4
- %b.addr = alloca %class.B*, align 8
+ %b.addr = alloca ptr, align 8
%agg.tmp = alloca %struct.SA, align 4
- %coerce.dive = getelementptr %struct.SA, %struct.SA* %sa, i32 0, i32 0
- store i32 %sa.coerce, i32* %coerce.dive
- store %class.B* %b, %class.B** %b.addr, align 8
- call void @llvm.dbg.declare(metadata %class.B** %b.addr, metadata !24, metadata !DIExpression()), !dbg !25
- call void @llvm.dbg.declare(metadata %struct.SA* %sa, metadata !26, metadata !DIExpression()), !dbg !27
- %0 = load %class.B*, %class.B** %b.addr, align 8, !dbg !28
- %1 = bitcast %struct.SA* %agg.tmp to i8*, !dbg !28
- %2 = bitcast %struct.SA* %sa to i8*, !dbg !28
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %1, i8* align 4 %2, i64 4, i1 false), !dbg !28
- %coerce.dive1 = getelementptr %struct.SA, %struct.SA* %agg.tmp, i32 0, i32 0, !dbg !28
- %3 = load i32, i32* %coerce.dive1, !dbg !28
- call void @_ZN1B5testBE2SA(%class.B* %0, i32 %3), !dbg !28
+ store i32 %sa.coerce, ptr %sa
+ store ptr %b, ptr %b.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %b.addr, metadata !24, metadata !DIExpression()), !dbg !25
+ call void @llvm.dbg.declare(metadata ptr %sa, metadata !26, metadata !DIExpression()), !dbg !27
+ %0 = load ptr, ptr %b.addr, align 8, !dbg !28
+ call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %sa, i64 4, i1 false), !dbg !28
+ %1 = load i32, ptr %agg.tmp, !dbg !28
+ call void @_ZN1B5testBE2SA(ptr %0, i32 %1), !dbg !28
ret void, !dbg !29
}
@@ -46,21 +42,20 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind ssp uwtable
-define linkonce_odr void @_ZN1B5testBE2SA(%class.B* %this, i32 %sa.coerce) #2 align 2 !dbg !20 {
+define linkonce_odr void @_ZN1B5testBE2SA(ptr %this, i32 %sa.coerce) #2 align 2 !dbg !20 {
entry:
%sa = alloca %struct.SA, align 4
- %this.addr = alloca %class.B*, align 8
- %coerce.dive = getelementptr %struct.SA, %struct.SA* %sa, i32 0, i32 0
- store i32 %sa.coerce, i32* %coerce.dive
- store %class.B* %this, %class.B** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.B** %this.addr, metadata !30, metadata !DIExpression()), !dbg !31
- call void @llvm.dbg.declare(metadata %struct.SA* %sa, metadata !32, metadata !DIExpression()), !dbg !33
- %this1 = load %class.B*, %class.B** %this.addr
+ %this.addr = alloca ptr, align 8
+ store i32 %sa.coerce, ptr %sa
+ store ptr %this, ptr %this.addr, align 8
+ call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !30, metadata !DIExpression()), !dbg !31
+ call void @llvm.dbg.declare(metadata ptr %sa, metadata !32, metadata !DIExpression()), !dbg !33
+ %this1 = load ptr, ptr %this.addr
ret void, !dbg !34
}
; Function Attrs: nounwind
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1) #3
+declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture readonly, i64, i1) #3
attributes #0 = { ssp uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
diff --git a/llvm/test/Linker/type-unique-unrelated.ll b/llvm/test/Linker/type-unique-unrelated.ll
index 26d05bbab6c43..886be7e8540cb 100644
--- a/llvm/test/Linker/type-unique-unrelated.ll
+++ b/llvm/test/Linker/type-unique-unrelated.ll
@@ -1,6 +1,6 @@
; RUN: llvm-link -S %s %p/Inputs/type-unique-unrelated2.ll %p/Inputs/type-unique-unrelated3.ll | FileCheck %s
-; CHECK: %t = type { i8* }
+; CHECK: %t = type { ptr }
; CHECK: define %t @f2() {
; CHECK-NEXT: %x = call %t @f2()
@@ -21,7 +21,7 @@
; type-unique-unrelated2.ll look unrelated until type-unique-unrelated3.ll
; is merged in.
-%t = type { i8* }
+%t = type { ptr }
declare %t @f()
define %t @f2() {
diff --git a/llvm/test/Linker/unnamed-addr1-a.ll b/llvm/test/Linker/unnamed-addr1-a.ll
index a96f089a99c00..a17805be26e5a 100644
--- a/llvm/test/Linker/unnamed-addr1-a.ll
+++ b/llvm/test/Linker/unnamed-addr1-a.ll
@@ -16,8 +16,8 @@ define weak void @func-b() unnamed_addr { ret void }
; CHECK-DAG: @global-c = common unnamed_addr global i32 0
@global-d = external global i32
-define i32* @use-global-d() {
- ret i32* @global-d
+define ptr @use-global-d() {
+ ret ptr @global-d
}
; CHECK-DAG: @global-d = global i32 42
@@ -27,9 +27,9 @@ define i32* @use-global-d() {
; CHECK-DAG: @global-f = global i32 42
@alias-a = weak global i32 42
-; CHECK-DAG: @alias-a = alias i32, i32* @global-f
+; CHECK-DAG: @alias-a = alias i32, ptr @global-f
@alias-b = weak unnamed_addr global i32 42
-; CHECK-DAG: @alias-b = unnamed_addr alias i32, i32* @global-f
+; CHECK-DAG: @alias-b = unnamed_addr alias i32, ptr @global-f
declare void @func-c()
define void @use-func-c() {
@@ -54,9 +54,9 @@ define weak void @func-e() unnamed_addr { ret void }
; CHECK-DAG: @global-j = global i32 42
@alias-c = weak global i32 42
-; CHECK-DAG: @alias-c = alias i32, i32* @global-f
+; CHECK-DAG: @alias-c = alias i32, ptr @global-f
@alias-d = weak unnamed_addr global i32 42
-; CHECK-DAG: @alias-d = alias i32, i32* @global-f
+; CHECK-DAG: @alias-d = alias i32, ptr @global-f
declare void @func-g()
diff --git a/llvm/test/Linker/unnamed-addr1-b.ll b/llvm/test/Linker/unnamed-addr1-b.ll
index 94334d6da73f8..473ea0a15f847 100644
--- a/llvm/test/Linker/unnamed-addr1-b.ll
+++ b/llvm/test/Linker/unnamed-addr1-b.ll
@@ -6,8 +6,8 @@
@global-e = unnamed_addr global i32 42
@global-f = unnamed_addr global i32 42
- at alias-a = unnamed_addr alias i32, i32* @global-f
- at alias-b = unnamed_addr alias i32, i32* @global-f
+ at alias-a = unnamed_addr alias i32, ptr @global-f
+ at alias-b = unnamed_addr alias i32, ptr @global-f
define weak void @func-c() unnamed_addr { ret void }
define weak void @func-d() unnamed_addr { ret void }
@@ -18,8 +18,8 @@ define weak void @func-e() unnamed_addr { ret void }
@global-i = global i32 42
@global-j = global i32 42
- at alias-c = alias i32, i32* @global-f
- at alias-d = alias i32, i32* @global-f
+ at alias-c = alias i32, ptr @global-f
+ at alias-d = alias i32, ptr @global-f
define weak void @func-g() { ret void }
define weak void @func-h() { ret void }
diff --git a/llvm/test/Linker/visibility.ll b/llvm/test/Linker/visibility.ll
index 4252aee61920a..f258adf876908 100644
--- a/llvm/test/Linker/visibility.ll
+++ b/llvm/test/Linker/visibility.ll
@@ -21,14 +21,14 @@ $c1 = comdat any
@v4 = global i32 1, comdat($c1)
; Aliases
-; CHECK: @a1 = hidden alias i32, i32* @v1
- at a1 = alias i32, i32* @v1
+; CHECK: @a1 = hidden alias i32, ptr @v1
+ at a1 = alias i32, ptr @v1
-; CHECK: @a2 = protected alias i32, i32* @v2
- at a2 = alias i32, i32* @v2
+; CHECK: @a2 = protected alias i32, ptr @v2
+ at a2 = alias i32, ptr @v2
-; CHECK: @a3 = hidden alias i32, i32* @v3
- at a3 = protected alias i32, i32* @v3
+; CHECK: @a3 = hidden alias i32, ptr @v3
+ at a3 = protected alias i32, ptr @v3
; Functions
diff --git a/llvm/test/Linker/weakextern.ll b/llvm/test/Linker/weakextern.ll
index 814550a907bb2..d37bb0a10c2e6 100644
--- a/llvm/test/Linker/weakextern.ll
+++ b/llvm/test/Linker/weakextern.ll
@@ -7,6 +7,6 @@
@MyVar = extern_weak global i32
@Inte = extern_weak global i32
-define weak [0 x i8]* @use_kallsyms_names() {
- ret [0 x i8]* @kallsyms_names
+define weak ptr @use_kallsyms_names() {
+ ret ptr @kallsyms_names
}
More information about the llvm-commits
mailing list