diff options
Diffstat (limited to 'test/Linker/Inputs')
-rw-r--r-- | test/Linker/Inputs/PR8300.b.ll | 2 | ||||
-rw-r--r-- | test/Linker/Inputs/alias.ll | 2 | ||||
-rw-r--r-- | test/Linker/Inputs/comdat.ll | 20 | ||||
-rw-r--r-- | test/Linker/Inputs/comdat2.ll | 2 | ||||
-rw-r--r-- | test/Linker/Inputs/comdat3.ll | 2 | ||||
-rw-r--r-- | test/Linker/Inputs/comdat4.ll | 5 | ||||
-rw-r--r-- | test/Linker/Inputs/comdat5.ll | 15 | ||||
-rw-r--r-- | test/Linker/Inputs/cycle.ll | 2 |
8 files changed, 46 insertions, 4 deletions
diff --git a/test/Linker/Inputs/PR8300.b.ll b/test/Linker/Inputs/PR8300.b.ll index 362d309..9e538f5 100644 --- a/test/Linker/Inputs/PR8300.b.ll +++ b/test/Linker/Inputs/PR8300.b.ll @@ -1,7 +1,7 @@ %foo = type { [8 x i8] } %bar = type { [9 x i8] } -@zed = alias void (%foo*), void (%bar*)* @xyz +@zed = alias bitcast (void (%bar*)* @xyz to void (%foo*)*) define void @xyz(%bar* %this) { entry: diff --git a/test/Linker/Inputs/alias.ll b/test/Linker/Inputs/alias.ll index b869cae..f379476 100644 --- a/test/Linker/Inputs/alias.ll +++ b/test/Linker/Inputs/alias.ll @@ -1,3 +1,3 @@ @zed = global i32 42 @foo = alias i32* @zed -@foo2 = alias i16, i32* @zed +@foo2 = alias bitcast (i32* @zed to i16*) diff --git a/test/Linker/Inputs/comdat.ll b/test/Linker/Inputs/comdat.ll new file mode 100644 index 0000000..fdcca49 --- /dev/null +++ b/test/Linker/Inputs/comdat.ll @@ -0,0 +1,20 @@ +target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32" +target triple = "i686-pc-windows-msvc" + +$foo = comdat largest +@foo = global i64 43, comdat $foo + +define i32 @bar() comdat $foo { + ret i32 43 +} + +$qux = comdat largest +@qux = global i32 13, comdat $qux +@in_unselected_group = global i32 13, comdat $qux + +define i32 @baz() comdat $qux { + ret i32 13 +} + +$any = comdat any +@any = global i64 7, comdat $any diff --git a/test/Linker/Inputs/comdat2.ll b/test/Linker/Inputs/comdat2.ll new file mode 100644 index 0000000..9e18304 --- /dev/null +++ b/test/Linker/Inputs/comdat2.ll @@ -0,0 +1,2 @@ +$foo = comdat largest +@foo = global i64 43, comdat $foo diff --git a/test/Linker/Inputs/comdat3.ll b/test/Linker/Inputs/comdat3.ll new file mode 100644 index 0000000..06f08b9 --- /dev/null +++ b/test/Linker/Inputs/comdat3.ll @@ -0,0 +1,2 @@ +$foo = comdat noduplicates +@foo = global i64 43, comdat $foo diff --git a/test/Linker/Inputs/comdat4.ll b/test/Linker/Inputs/comdat4.ll new file mode 100644 index 0000000..bbfe3f7 --- /dev/null +++ b/test/Linker/Inputs/comdat4.ll @@ -0,0 +1,5 @@ +target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32" +target triple = "i686-pc-windows-msvc" + +$foo = comdat samesize +@foo = global i64 42, comdat $foo diff --git a/test/Linker/Inputs/comdat5.ll b/test/Linker/Inputs/comdat5.ll new file mode 100644 index 0000000..800af18 --- /dev/null +++ b/test/Linker/Inputs/comdat5.ll @@ -0,0 +1,15 @@ +target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32" +target triple = "i686-pc-windows-msvc" + +%MSRTTICompleteObjectLocator = type { i32, i32, i32, i8*, %MSRTTIClassHierarchyDescriptor* } +%MSRTTIClassHierarchyDescriptor = type { i32, i32, i32, %MSRTTIBaseClassDescriptor** } +%MSRTTIBaseClassDescriptor = type { i8*, i32, i32, i32, i32, i32, %MSRTTIClassHierarchyDescriptor* } +%struct.S = type { i32 (...)** } + +$"\01??_7S@@6B@" = comdat largest + +@"\01??_R4S@@6B@" = external constant %MSRTTICompleteObjectLocator +@some_name = private unnamed_addr constant [2 x i8*] [i8* bitcast (%MSRTTICompleteObjectLocator* @"\01??_R4S@@6B@" to i8*), i8* bitcast (void (%struct.S*, i32)* @"\01??_GS@@UAEPAXI@Z" to i8*)], comdat $"\01??_7S@@6B@" +@"\01??_7S@@6B@" = alias getelementptr([2 x i8*]* @some_name, i32 0, i32 1) + +declare x86_thiscallcc void @"\01??_GS@@UAEPAXI@Z"(%struct.S*, i32) unnamed_addr diff --git a/test/Linker/Inputs/cycle.ll b/test/Linker/Inputs/cycle.ll deleted file mode 100644 index d0eddb6..0000000 --- a/test/Linker/Inputs/cycle.ll +++ /dev/null @@ -1,2 +0,0 @@ -@foo = alias i32* @bar -@bar = weak global i32 0 |