summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-01-06 22:55:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-01-06 22:55:16 +0000
commit83a362cde8dda902ae516dbb1a721735a338abbb (patch)
tree6e0316b50f28fe0ba8628ada534b2cf4017799db /llvm/test
parented844c4ad1e403aff4eae0799eeccd21a3a36c90 (diff)
downloadbcm5719-llvm-83a362cde8dda902ae516dbb1a721735a338abbb.tar.gz
bcm5719-llvm-83a362cde8dda902ae516dbb1a721735a338abbb.zip
Change the .ll syntax for comdats and add a syntactic sugar.
In order to make comdats always explicit in the IR, we decided to make the syntax a bit more compact for the case of a GlobalObject in a comdat with the same name. Just dropping the $name causes problems for @foo = globabl i32 0, comdat $bar = comdat ... and declare void @foo() comdat $bar = comdat ... So the syntax is changed to @g1 = globabl i32 0, comdat($c1) @g2 = globabl i32 0, comdat and declare void @foo() comdat($c1) declare void @foo() comdat llvm-svn: 225302
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Assembler/invalid-comdat.ll2
-rw-r--r--llvm/test/Assembler/unnamed-comdat.ll6
-rw-r--r--llvm/test/CodeGen/X86/coff-comdat.ll34
-rw-r--r--llvm/test/CodeGen/X86/coff-comdat2.ll2
-rw-r--r--llvm/test/CodeGen/X86/coff-comdat3.ll2
-rw-r--r--llvm/test/CodeGen/X86/elf-comdat.ll4
-rw-r--r--llvm/test/CodeGen/X86/elf-comdat2.ll2
-rw-r--r--llvm/test/CodeGen/X86/macho-comdat.ll2
-rw-r--r--llvm/test/Feature/comdat.ll10
-rw-r--r--llvm/test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll2
-rw-r--r--llvm/test/Linker/Inputs/comdat.ll12
-rw-r--r--llvm/test/Linker/Inputs/comdat2.ll2
-rw-r--r--llvm/test/Linker/Inputs/comdat3.ll2
-rw-r--r--llvm/test/Linker/Inputs/comdat4.ll2
-rw-r--r--llvm/test/Linker/Inputs/comdat5.ll2
-rw-r--r--llvm/test/Linker/Inputs/comdat8.ll2
-rw-r--r--llvm/test/Linker/Inputs/visibility.ll2
-rw-r--r--llvm/test/Linker/comdat.ll20
-rw-r--r--llvm/test/Linker/comdat2.ll2
-rw-r--r--llvm/test/Linker/comdat3.ll2
-rw-r--r--llvm/test/Linker/comdat4.ll2
-rw-r--r--llvm/test/Linker/comdat5.ll2
-rw-r--r--llvm/test/Linker/comdat6.ll2
-rw-r--r--llvm/test/Linker/comdat7.ll2
-rw-r--r--llvm/test/Linker/comdat8.ll2
-rw-r--r--llvm/test/Linker/comdat9.ll8
-rw-r--r--llvm/test/Linker/constructor-comdat.ll4
-rw-r--r--llvm/test/Linker/visibility.ll4
-rw-r--r--llvm/test/Transforms/GlobalDCE/pr20981.ll4
-rw-r--r--llvm/test/Transforms/GlobalOpt/pr21191.ll8
-rw-r--r--llvm/test/Transforms/GlobalOpt/preserve-comdats.ll6
-rw-r--r--llvm/test/Transforms/Inline/pr21206.ll8
-rw-r--r--llvm/test/Verifier/comdat.ll2
-rw-r--r--llvm/test/Verifier/comdat2.ll2
-rw-r--r--llvm/test/tools/gold/Inputs/comdat.ll4
-rw-r--r--llvm/test/tools/gold/comdat.ll12
36 files changed, 96 insertions, 90 deletions
diff --git a/llvm/test/Assembler/invalid-comdat.ll b/llvm/test/Assembler/invalid-comdat.ll
index 987e1e1e7d9..7351999df88 100644
--- a/llvm/test/Assembler/invalid-comdat.ll
+++ b/llvm/test/Assembler/invalid-comdat.ll
@@ -1,4 +1,4 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
-@v = global i32 0, comdat $v
+@v = global i32 0, comdat($v)
; CHECK: use of undefined comdat '$v'
diff --git a/llvm/test/Assembler/unnamed-comdat.ll b/llvm/test/Assembler/unnamed-comdat.ll
new file mode 100644
index 00000000000..8aa0f78c974
--- /dev/null
+++ b/llvm/test/Assembler/unnamed-comdat.ll
@@ -0,0 +1,6 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: comdat cannot be unnamed
+
+define void @0() comdat {
+ ret void
+}
diff --git a/llvm/test/CodeGen/X86/coff-comdat.ll b/llvm/test/CodeGen/X86/coff-comdat.ll
index ac4546d3368..dcbbe1097d5 100644
--- a/llvm/test/CodeGen/X86/coff-comdat.ll
+++ b/llvm/test/CodeGen/X86/coff-comdat.ll
@@ -1,58 +1,58 @@
; RUN: llc -mtriple i386-pc-win32 < %s | FileCheck %s
$f1 = comdat any
-@v1 = global i32 0, comdat $f1
-define void @f1() comdat $f1 {
+@v1 = global i32 0, comdat($f1)
+define void @f1() comdat($f1) {
ret void
}
$f2 = comdat exactmatch
-@v2 = global i32 0, comdat $f2
-define void @f2() comdat $f2 {
+@v2 = global i32 0, comdat($f2)
+define void @f2() comdat($f2) {
ret void
}
$f3 = comdat largest
-@v3 = global i32 0, comdat $f3
-define void @f3() comdat $f3 {
+@v3 = global i32 0, comdat($f3)
+define void @f3() comdat($f3) {
ret void
}
$f4 = comdat noduplicates
-@v4 = global i32 0, comdat $f4
-define void @f4() comdat $f4 {
+@v4 = global i32 0, comdat($f4)
+define void @f4() comdat($f4) {
ret void
}
$f5 = comdat samesize
-@v5 = global i32 0, comdat $f5
-define void @f5() comdat $f5 {
+@v5 = global i32 0, comdat($f5)
+define void @f5() comdat($f5) {
ret void
}
$f6 = comdat samesize
-@v6 = global i32 0, comdat $f6
-@f6 = global i32 0, comdat $f6
+@v6 = global i32 0, comdat($f6)
+@f6 = global i32 0, comdat($f6)
$"\01@f7@0" = comdat any
-define x86_fastcallcc void @"\01@v7@0"() comdat $"\01@f7@0" {
+define x86_fastcallcc void @"\01@v7@0"() comdat($"\01@f7@0") {
ret void
}
-define x86_fastcallcc void @"\01@f7@0"() comdat $"\01@f7@0" {
+define x86_fastcallcc void @"\01@f7@0"() comdat($"\01@f7@0") {
ret void
}
$f8 = comdat any
-define x86_fastcallcc void @v8() comdat $f8 {
+define x86_fastcallcc void @v8() comdat($f8) {
ret void
}
-define x86_fastcallcc void @f8() comdat $f8 {
+define x86_fastcallcc void @f8() comdat($f8) {
ret void
}
$vftable = comdat largest
-@some_name = private unnamed_addr constant [2 x i8*] zeroinitializer, comdat $vftable
+@some_name = private unnamed_addr constant [2 x i8*] zeroinitializer, comdat($vftable)
@vftable = alias getelementptr([2 x i8*]* @some_name, i32 0, i32 1)
; CHECK: .section .text,"xr",discard,_f1
diff --git a/llvm/test/CodeGen/X86/coff-comdat2.ll b/llvm/test/CodeGen/X86/coff-comdat2.ll
index 58bc04eea93..a417d096c47 100644
--- a/llvm/test/CodeGen/X86/coff-comdat2.ll
+++ b/llvm/test/CodeGen/X86/coff-comdat2.ll
@@ -5,5 +5,5 @@ target triple = "i686-pc-windows-msvc"
$foo = comdat largest
@foo = global i32 0
-@bar = global i32 0, comdat $foo
+@bar = global i32 0, comdat($foo)
; CHECK: Associative COMDAT symbol 'foo' is not a key for its COMDAT.
diff --git a/llvm/test/CodeGen/X86/coff-comdat3.ll b/llvm/test/CodeGen/X86/coff-comdat3.ll
index 76e464b2754..01651ce4820 100644
--- a/llvm/test/CodeGen/X86/coff-comdat3.ll
+++ b/llvm/test/CodeGen/X86/coff-comdat3.ll
@@ -4,5 +4,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 largest
-@bar = global i32 0, comdat $foo
+@bar = global i32 0, comdat($foo)
; CHECK: Associative COMDAT symbol 'foo' does not exist.
diff --git a/llvm/test/CodeGen/X86/elf-comdat.ll b/llvm/test/CodeGen/X86/elf-comdat.ll
index c7e6df7d64f..35d8d6f2d2a 100644
--- a/llvm/test/CodeGen/X86/elf-comdat.ll
+++ b/llvm/test/CodeGen/X86/elf-comdat.ll
@@ -1,8 +1,8 @@
; RUN: llc -mtriple x86_64-pc-linux-gnu < %s | FileCheck %s
$f = comdat any
-@v = global i32 0, comdat $f
-define void @f() comdat $f {
+@v = global i32 0, comdat($f)
+define void @f() comdat($f) {
ret void
}
; CHECK: .section .text.f,"axG",@progbits,f,comdat
diff --git a/llvm/test/CodeGen/X86/elf-comdat2.ll b/llvm/test/CodeGen/X86/elf-comdat2.ll
index 209da39ed88..786cec78cc3 100644
--- a/llvm/test/CodeGen/X86/elf-comdat2.ll
+++ b/llvm/test/CodeGen/X86/elf-comdat2.ll
@@ -1,7 +1,7 @@
; RUN: llc -mtriple x86_64-pc-linux-gnu < %s | FileCheck %s
$foo = comdat any
-@bar = global i32 42, comdat $foo
+@bar = global i32 42, comdat($foo)
@foo = global i32 42
; CHECK: .type bar,@object
diff --git a/llvm/test/CodeGen/X86/macho-comdat.ll b/llvm/test/CodeGen/X86/macho-comdat.ll
index 3c2d997b459..60560470ed5 100644
--- a/llvm/test/CodeGen/X86/macho-comdat.ll
+++ b/llvm/test/CodeGen/X86/macho-comdat.ll
@@ -2,5 +2,5 @@
; RUN: FileCheck < %t %s
$f = comdat any
-@v = global i32 0, comdat $f
+@v = global i32 0, comdat($f)
; CHECK: LLVM ERROR: MachO doesn't support COMDATs, 'f' cannot be lowered.
diff --git a/llvm/test/Feature/comdat.ll b/llvm/test/Feature/comdat.ll
index 1e878bb71cd..c2a9d639629 100644
--- a/llvm/test/Feature/comdat.ll
+++ b/llvm/test/Feature/comdat.ll
@@ -6,16 +6,16 @@ $f = comdat any
$f2 = comdat any
; CHECK-NOT: f2
-@v = global i32 0, comdat $f
-; CHECK: @v = global i32 0, comdat $f
+@v = global i32 0, comdat($f)
+; CHECK: @v = global i32 0, comdat($f)
@a = alias i32* @v
; CHECK: @a = alias i32* @v{{$}}
-define void @f() comdat $f {
+define void @f() comdat($f) {
ret void
}
-; CHECK: define void @f() comdat $f
+; CHECK: define void @f() comdat {
$i = comdat largest
-@i = internal global i32 0, comdat $i
+@i = internal global i32 0, comdat($i)
diff --git a/llvm/test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll b/llvm/test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll
index 8d14e839962..fcc166e966e 100644
--- a/llvm/test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll
+++ b/llvm/test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll
@@ -5,7 +5,7 @@ target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
target triple = "i686-pc-windows-msvc"
; no action should be taken for these globals
$global_noinst = comdat largest
-@aliasee = private unnamed_addr constant [2 x i8] [i8 1, i8 2], comdat $global_noinst
+@aliasee = private unnamed_addr constant [2 x i8] [i8 1, i8 2], comdat($global_noinst)
@global_noinst = unnamed_addr alias [2 x i8]* @aliasee
; CHECK-NOT: {{asan_gen.*global_noinst}}
; CHECK-DAG: @global_noinst = unnamed_addr alias [2 x i8]* @aliasee
diff --git a/llvm/test/Linker/Inputs/comdat.ll b/llvm/test/Linker/Inputs/comdat.ll
index fdcca49c3c3..74a805cf862 100644
--- a/llvm/test/Linker/Inputs/comdat.ll
+++ b/llvm/test/Linker/Inputs/comdat.ll
@@ -2,19 +2,19 @@ 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
+@foo = global i64 43, comdat($foo)
-define i32 @bar() 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
+@qux = global i32 13, comdat($qux)
+@in_unselected_group = global i32 13, comdat($qux)
-define i32 @baz() comdat $qux {
+define i32 @baz() comdat($qux) {
ret i32 13
}
$any = comdat any
-@any = global i64 7, comdat $any
+@any = global i64 7, comdat($any)
diff --git a/llvm/test/Linker/Inputs/comdat2.ll b/llvm/test/Linker/Inputs/comdat2.ll
index 9e18304744b..ed2af6239cd 100644
--- a/llvm/test/Linker/Inputs/comdat2.ll
+++ b/llvm/test/Linker/Inputs/comdat2.ll
@@ -1,2 +1,2 @@
$foo = comdat largest
-@foo = global i64 43, comdat $foo
+@foo = global i64 43, comdat($foo)
diff --git a/llvm/test/Linker/Inputs/comdat3.ll b/llvm/test/Linker/Inputs/comdat3.ll
index 06f08b947af..a1b730f216f 100644
--- a/llvm/test/Linker/Inputs/comdat3.ll
+++ b/llvm/test/Linker/Inputs/comdat3.ll
@@ -1,2 +1,2 @@
$foo = comdat noduplicates
-@foo = global i64 43, comdat $foo
+@foo = global i64 43, comdat($foo)
diff --git a/llvm/test/Linker/Inputs/comdat4.ll b/llvm/test/Linker/Inputs/comdat4.ll
index bbfe3f794ab..5b4b812c774 100644
--- a/llvm/test/Linker/Inputs/comdat4.ll
+++ b/llvm/test/Linker/Inputs/comdat4.ll
@@ -2,4 +2,4 @@ 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
+@foo = global i64 42, comdat($foo)
diff --git a/llvm/test/Linker/Inputs/comdat5.ll b/llvm/test/Linker/Inputs/comdat5.ll
index 3af63337dcd..98c42b7be0c 100644
--- a/llvm/test/Linker/Inputs/comdat5.ll
+++ b/llvm/test/Linker/Inputs/comdat5.ll
@@ -3,7 +3,7 @@ target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
$foo = comdat largest
@zed = external constant i8
-@some_name = private unnamed_addr constant [2 x i8*] [i8* @zed, i8* bitcast (void ()* @bar to i8*)], comdat $foo
+@some_name = private unnamed_addr constant [2 x i8*] [i8* @zed, i8* bitcast (void ()* @bar to i8*)], comdat($foo)
@foo = alias getelementptr([2 x i8*]* @some_name, i32 0, i32 1)
declare void @bar() unnamed_addr
diff --git a/llvm/test/Linker/Inputs/comdat8.ll b/llvm/test/Linker/Inputs/comdat8.ll
index eaa96254ac6..a2833b05cf1 100644
--- a/llvm/test/Linker/Inputs/comdat8.ll
+++ b/llvm/test/Linker/Inputs/comdat8.ll
@@ -1,4 +1,4 @@
$c1 = comdat largest
-@some_name = private unnamed_addr constant i32 42, comdat $c1
+@some_name = private unnamed_addr constant i32 42, comdat($c1)
@c1 = alias i32* @some_name
diff --git a/llvm/test/Linker/Inputs/visibility.ll b/llvm/test/Linker/Inputs/visibility.ll
index 2ab58fd3bd0..2cd112ed37f 100644
--- a/llvm/test/Linker/Inputs/visibility.ll
+++ b/llvm/test/Linker/Inputs/visibility.ll
@@ -4,7 +4,7 @@ $c1 = comdat any
@v1 = weak hidden global i32 0
@v2 = weak protected global i32 0
@v3 = weak hidden global i32 0
-@v4 = hidden global i32 1, comdat $c1
+@v4 = hidden global i32 1, comdat($c1)
; Aliases
@a1 = weak hidden alias i32* @v1
diff --git a/llvm/test/Linker/comdat.ll b/llvm/test/Linker/comdat.ll
index 4d2aef7b8a0..2a2ec3bbb6b 100644
--- a/llvm/test/Linker/comdat.ll
+++ b/llvm/test/Linker/comdat.ll
@@ -3,30 +3,30 @@ 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 i32 42, comdat $foo
+@foo = global i32 42, comdat($foo)
-define i32 @bar() comdat $foo {
+define i32 @bar() comdat($foo) {
ret i32 42
}
$qux = comdat largest
-@qux = global i64 12, comdat $qux
+@qux = global i64 12, comdat($qux)
-define i32 @baz() comdat $qux {
+define i32 @baz() comdat($qux) {
ret i32 12
}
$any = comdat any
-@any = global i64 6, comdat $any
+@any = global i64 6, comdat($any)
; CHECK: $qux = comdat largest
; CHECK: $foo = comdat largest
; CHECK: $any = comdat any
-; CHECK: @qux = global i64 12, comdat $qux
-; CHECK: @any = global i64 6, comdat $any
-; CHECK: @foo = global i64 43, comdat $foo
+; CHECK: @qux = global i64 12, comdat{{$}}
+; CHECK: @any = global i64 6, comdat{{$}}
+; CHECK: @foo = global i64 43, comdat{{$}}
; CHECK-NOT: @in_unselected_group = global i32 13, comdat $qux
-; CHECK: define i32 @baz() comdat $qux
-; CHECK: define i32 @bar() comdat $foo
+; CHECK: define i32 @baz() comdat($qux)
+; CHECK: define i32 @bar() comdat($foo)
diff --git a/llvm/test/Linker/comdat2.ll b/llvm/test/Linker/comdat2.ll
index 60c3d7cf550..ba8115dbae5 100644
--- a/llvm/test/Linker/comdat2.ll
+++ b/llvm/test/Linker/comdat2.ll
@@ -3,5 +3,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 i32 42, comdat $foo
+@foo = global i32 42, comdat($foo)
; CHECK: Linking COMDATs named 'foo': invalid selection kinds!
diff --git a/llvm/test/Linker/comdat3.ll b/llvm/test/Linker/comdat3.ll
index f0d9a48bb9d..3b5db0a39a0 100644
--- a/llvm/test/Linker/comdat3.ll
+++ b/llvm/test/Linker/comdat3.ll
@@ -1,5 +1,5 @@
; RUN: not llvm-link %s %p/Inputs/comdat2.ll -S -o - 2>&1 | FileCheck %s
$foo = comdat largest
-@foo = global i32 43, comdat $foo
+@foo = global i32 43, comdat($foo)
; CHECK: Linking COMDATs named 'foo': can't do size dependent selection without DataLayout!
diff --git a/llvm/test/Linker/comdat4.ll b/llvm/test/Linker/comdat4.ll
index 50c1778e894..cf7ac5f5d0d 100644
--- a/llvm/test/Linker/comdat4.ll
+++ b/llvm/test/Linker/comdat4.ll
@@ -1,5 +1,5 @@
; RUN: not llvm-link %s %p/Inputs/comdat3.ll -S -o - 2>&1 | FileCheck %s
$foo = comdat noduplicates
-@foo = global i64 43, comdat $foo
+@foo = global i64 43, comdat($foo)
; CHECK: Linking COMDATs named 'foo': noduplicates has been violated!
diff --git a/llvm/test/Linker/comdat5.ll b/llvm/test/Linker/comdat5.ll
index 011fb8c0f46..759688ee47e 100644
--- a/llvm/test/Linker/comdat5.ll
+++ b/llvm/test/Linker/comdat5.ll
@@ -3,5 +3,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 i32 42, comdat $foo
+@foo = global i32 42, comdat($foo)
; CHECK: Linking COMDATs named 'foo': SameSize violated!
diff --git a/llvm/test/Linker/comdat6.ll b/llvm/test/Linker/comdat6.ll
index 497bf08febf..b5360a7c7da 100644
--- a/llvm/test/Linker/comdat6.ll
+++ b/llvm/test/Linker/comdat6.ll
@@ -3,7 +3,7 @@
target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
$foo = comdat largest
-@foo = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast (void ()* @bar to i8*)], comdat $foo
+@foo = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast (void ()* @bar to i8*)], comdat($foo)
; CHECK: @foo = alias getelementptr inbounds ([2 x i8*]* @some_name, i32 0, i32 1)
diff --git a/llvm/test/Linker/comdat7.ll b/llvm/test/Linker/comdat7.ll
index d7e5e2d0a1a..ef938a706bf 100644
--- a/llvm/test/Linker/comdat7.ll
+++ b/llvm/test/Linker/comdat7.ll
@@ -2,7 +2,7 @@
$c1 = comdat largest
-define void @c1() comdat $c1 {
+define void @c1() comdat($c1) {
ret void
}
; CHECK: GlobalVariable required for data dependent selection!
diff --git a/llvm/test/Linker/comdat8.ll b/llvm/test/Linker/comdat8.ll
index e6da58383e0..5ca352a8509 100644
--- a/llvm/test/Linker/comdat8.ll
+++ b/llvm/test/Linker/comdat8.ll
@@ -2,7 +2,7 @@
$c1 = comdat largest
-@some_name = private unnamed_addr constant i32 42, comdat $c1
+@some_name = private unnamed_addr constant i32 42, comdat($c1)
@c1 = alias i8* inttoptr (i32 ptrtoint (i32* @some_name to i32) to i8*)
; CHECK: COMDAT key involves incomputable alias size.
diff --git a/llvm/test/Linker/comdat9.ll b/llvm/test/Linker/comdat9.ll
index c48d256959d..f155a6e3562 100644
--- a/llvm/test/Linker/comdat9.ll
+++ b/llvm/test/Linker/comdat9.ll
@@ -2,18 +2,18 @@
$c = comdat any
@a = alias void ()* @f
-define internal void @f() comdat $c {
+define internal void @f() comdat($c) {
ret void
}
; CHECK-DAG: $c = comdat any
; CHECK-DAG: @a = alias void ()* @f
-; CHECK-DAG: define internal void @f() comdat $c
+; CHECK-DAG: define internal void @f() comdat($c)
$f2 = comdat largest
-define internal void @f2() comdat $f2 {
+define internal void @f2() comdat($f2) {
ret void
}
; CHECK-DAG: $f2 = comdat largest
-; CHECK-DAG: define internal void @f2() comdat $f2
+; CHECK-DAG: define internal void @f2() comdat {
diff --git a/llvm/test/Linker/constructor-comdat.ll b/llvm/test/Linker/constructor-comdat.ll
index 42e2d83424a..dfc899208aa 100644
--- a/llvm/test/Linker/constructor-comdat.ll
+++ b/llvm/test/Linker/constructor-comdat.ll
@@ -7,7 +7,7 @@ $_ZN3fooIiEC5Ev = comdat any
@_ZN3fooIiEC1Ev = weak_odr alias void ()* @_ZN3fooIiEC2Ev
; CHECK: @_ZN3fooIiEC1Ev = weak_odr alias void ()* @_ZN3fooIiEC2Ev
-; CHECK: define weak_odr void @_ZN3fooIiEC2Ev() comdat $_ZN3fooIiEC5Ev {
-define weak_odr void @_ZN3fooIiEC2Ev() comdat $_ZN3fooIiEC5Ev {
+; CHECK: define weak_odr void @_ZN3fooIiEC2Ev() comdat($_ZN3fooIiEC5Ev) {
+define weak_odr void @_ZN3fooIiEC2Ev() comdat($_ZN3fooIiEC5Ev) {
ret void
}
diff --git a/llvm/test/Linker/visibility.ll b/llvm/test/Linker/visibility.ll
index 6436197bf20..4938d7af56d 100644
--- a/llvm/test/Linker/visibility.ll
+++ b/llvm/test/Linker/visibility.ll
@@ -17,8 +17,8 @@ $c1 = comdat any
; CHECK-DAG: @v3 = hidden global i32 0
@v3 = protected global i32 0
-; CHECK-DAG: @v4 = hidden global i32 1, comdat $c1
-@v4 = global i32 1, comdat $c1
+; CHECK-DAG: @v4 = hidden global i32 1, comdat($c1)
+@v4 = global i32 1, comdat($c1)
; Aliases
; CHECK: @a1 = hidden alias i32* @v1
diff --git a/llvm/test/Transforms/GlobalDCE/pr20981.ll b/llvm/test/Transforms/GlobalDCE/pr20981.ll
index 92d28408fdc..0eaa6b89909 100644
--- a/llvm/test/Transforms/GlobalDCE/pr20981.ll
+++ b/llvm/test/Transforms/GlobalDCE/pr20981.ll
@@ -6,10 +6,10 @@ $c1 = comdat any
@a1 = linkonce_odr alias void ()* @f1
; CHECK: @a1 = linkonce_odr alias void ()* @f1
-define linkonce_odr void @f1() comdat $c1 {
+define linkonce_odr void @f1() comdat($c1) {
ret void
}
-; CHECK: define linkonce_odr void @f1() comdat $c1
+; CHECK: define linkonce_odr void @f1() comdat($c1)
define void @g() {
call void @f1()
diff --git a/llvm/test/Transforms/GlobalOpt/pr21191.ll b/llvm/test/Transforms/GlobalOpt/pr21191.ll
index 39b8eee9a25..34e15cb3404 100644
--- a/llvm/test/Transforms/GlobalOpt/pr21191.ll
+++ b/llvm/test/Transforms/GlobalOpt/pr21191.ll
@@ -3,15 +3,15 @@
$c = comdat any
; CHECK: $c = comdat any
-define linkonce_odr void @foo() comdat $c {
+define linkonce_odr void @foo() comdat($c) {
ret void
}
-; CHECK: define linkonce_odr void @foo() comdat $c
+; CHECK: define linkonce_odr void @foo() comdat($c)
-define linkonce_odr void @bar() comdat $c {
+define linkonce_odr void @bar() comdat($c) {
ret void
}
-; CHECK: define linkonce_odr void @bar() comdat $c
+; CHECK: define linkonce_odr void @bar() comdat($c)
define void @zed() {
call void @foo()
diff --git a/llvm/test/Transforms/GlobalOpt/preserve-comdats.ll b/llvm/test/Transforms/GlobalOpt/preserve-comdats.ll
index 08188b9d427..0148f0024b9 100644
--- a/llvm/test/Transforms/GlobalOpt/preserve-comdats.ll
+++ b/llvm/test/Transforms/GlobalOpt/preserve-comdats.ll
@@ -2,9 +2,9 @@
$comdat_global = comdat any
-@comdat_global = weak_odr global i8 0, comdat $comdat_global
+@comdat_global = weak_odr global i8 0, comdat($comdat_global)
@simple_global = internal global i8 0
-; CHECK: @comdat_global = weak_odr global i8 0, comdat $comdat_global
+; CHECK: @comdat_global = weak_odr global i8 0, comdat{{$}}
; CHECK: @simple_global = internal global i8 42
@llvm.global_ctors = appending global [2 x { i32, void ()*, i8* }] [
@@ -20,7 +20,7 @@ define void @init_comdat_global() {
}
; CHECK: define void @init_comdat_global()
-define internal void @init_simple_global() comdat $comdat_global {
+define internal void @init_simple_global() comdat($comdat_global) {
store i8 42, i8* @simple_global
ret void
}
diff --git a/llvm/test/Transforms/Inline/pr21206.ll b/llvm/test/Transforms/Inline/pr21206.ll
index 1a4366ecdb8..e46003050a9 100644
--- a/llvm/test/Transforms/Inline/pr21206.ll
+++ b/llvm/test/Transforms/Inline/pr21206.ll
@@ -3,15 +3,15 @@
$c = comdat any
; CHECK: $c = comdat any
-define linkonce_odr void @foo() comdat $c {
+define linkonce_odr void @foo() comdat($c) {
ret void
}
-; CHECK: define linkonce_odr void @foo() comdat $c
+; CHECK: define linkonce_odr void @foo() comdat($c)
-define linkonce_odr void @bar() comdat $c {
+define linkonce_odr void @bar() comdat($c) {
ret void
}
-; CHECK: define linkonce_odr void @bar() comdat $c
+; CHECK: define linkonce_odr void @bar() comdat($c)
define void()* @zed() {
ret void()* @foo
diff --git a/llvm/test/Verifier/comdat.ll b/llvm/test/Verifier/comdat.ll
index ca47429b108..dcf67d89f8d 100644
--- a/llvm/test/Verifier/comdat.ll
+++ b/llvm/test/Verifier/comdat.ll
@@ -1,5 +1,5 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
$v = comdat any
-@v = common global i32 0, comdat $v
+@v = common global i32 0, comdat($v)
; CHECK: 'common' global may not be in a Comdat!
diff --git a/llvm/test/Verifier/comdat2.ll b/llvm/test/Verifier/comdat2.ll
index d78030c12af..9d892b974fa 100644
--- a/llvm/test/Verifier/comdat2.ll
+++ b/llvm/test/Verifier/comdat2.ll
@@ -1,5 +1,5 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
$v = comdat any
-@v = private global i32 0, comdat $v
+@v = private global i32 0, comdat($v)
; CHECK: comdat global value has private linkage
diff --git a/llvm/test/tools/gold/Inputs/comdat.ll b/llvm/test/tools/gold/Inputs/comdat.ll
index e9e4704cc1b..8b699d439c5 100644
--- a/llvm/test/tools/gold/Inputs/comdat.ll
+++ b/llvm/test/tools/gold/Inputs/comdat.ll
@@ -1,7 +1,7 @@
$c2 = comdat any
-@v1 = weak_odr global i32 41, comdat $c2
-define weak_odr protected i32 @f1(i8* %this) comdat $c2 {
+@v1 = weak_odr global i32 41, comdat($c2)
+define weak_odr protected i32 @f1(i8* %this) comdat($c2) {
bb20:
store i8* %this, i8** null
br label %bb21
diff --git a/llvm/test/tools/gold/comdat.ll b/llvm/test/tools/gold/comdat.ll
index ba3abce91a9..2edd7822c91 100644
--- a/llvm/test/tools/gold/comdat.ll
+++ b/llvm/test/tools/gold/comdat.ll
@@ -6,8 +6,8 @@
$c1 = comdat any
-@v1 = weak_odr global i32 42, comdat $c1
-define weak_odr i32 @f1(i8*) comdat $c1 {
+@v1 = weak_odr global i32 42, comdat($c1)
+define weak_odr i32 @f1(i8*) comdat($c1) {
bb10:
br label %bb11
bb11:
@@ -27,7 +27,7 @@ bb11:
; CHECK: $c1 = comdat any
; CHECK: $c2 = comdat any
-; CHECK: @v1 = weak_odr global i32 42, comdat $c1
+; CHECK: @v1 = weak_odr global i32 42, comdat($c1)
; CHECK: @r11 = global i32* @v1{{$}}
; CHECK: @r12 = global i32 (i8*)* @f1{{$}}
@@ -35,7 +35,7 @@ bb11:
; CHECK: @r21 = global i32* @v1{{$}}
; CHECK: @r22 = global i32 (i8*)* @f1{{$}}
-; CHECK: @v11 = internal global i32 41, comdat $c2
+; CHECK: @v11 = internal global i32 41, comdat($c2)
; CHECK: @a11 = alias i32* @v1{{$}}
; CHECK: @a12 = alias bitcast (i32* @v1 to i16*)
@@ -49,14 +49,14 @@ bb11:
; CHECK: @a23 = alias i32 (i8*)* @f12{{$}}
; CHECK: @a24 = alias bitcast (i32 (i8*)* @f12 to i16*)
-; CHECK: define weak_odr protected i32 @f1(i8*) comdat $c1 {
+; CHECK: define weak_odr protected i32 @f1(i8*) comdat($c1) {
; CHECK-NEXT: bb10:
; CHECK-NEXT: br label %bb11{{$}}
; CHECK: bb11:
; CHECK-NEXT: ret i32 42
; CHECK-NEXT: }
-; CHECK: define internal i32 @f12(i8* %this) comdat $c2 {
+; CHECK: define internal i32 @f12(i8* %this) comdat($c2) {
; CHECK-NEXT: bb20:
; CHECK-NEXT: store i8* %this, i8** null
; CHECK-NEXT: br label %bb21
OpenPOWER on IntegriCloud