summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-06-01 01:17:57 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-06-01 01:17:57 +0000
commit382d81cacf066452b98128b680f0988e5bda89a8 (patch)
tree1d50935b001bb7b52b70a6a9d87e0b3139b82292 /llvm/test
parent09ec5756dc7d92c3a2f91313736c157bf3ffd848 (diff)
downloadbcm5719-llvm-382d81cacf066452b98128b680f0988e5bda89a8.tar.gz
bcm5719-llvm-382d81cacf066452b98128b680f0988e5bda89a8.zip
IR: Allow multiple global metadata attachments with the same type.
This will be necessary to allow the global merge pass to attach multiple debug info metadata nodes to global variables once we reverse the edge from DIGlobalVariable to GlobalVariable. Differential Revision: http://reviews.llvm.org/D20414 llvm-svn: 271358
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Assembler/metadata.ll4
-rw-r--r--llvm/test/Verifier/metadata-function-dbg.ll7
2 files changed, 8 insertions, 3 deletions
diff --git a/llvm/test/Assembler/metadata.ll b/llvm/test/Assembler/metadata.ll
index 2fe26be47de..a4b9c8af41d 100644
--- a/llvm/test/Assembler/metadata.ll
+++ b/llvm/test/Assembler/metadata.ll
@@ -1,8 +1,8 @@
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
-; CHECK: @global = global i32 0, !foo [[M2:![0-9]+]], !baz [[M3:![0-9]+]]
-@global = global i32 0, !foo !2, !baz !3
+; CHECK: @global = global i32 0, !foo [[M2:![0-9]+]], !foo [[M3:![0-9]+]], !baz [[M3]]
+@global = global i32 0, !foo !2, !foo !3, !baz !3
; CHECK-LABEL: @test
; CHECK: ret void, !foo [[M0:![0-9]+]], !bar [[M1:![0-9]+]]
diff --git a/llvm/test/Verifier/metadata-function-dbg.ll b/llvm/test/Verifier/metadata-function-dbg.ll
index b839e8708d1..77f7de26c87 100644
--- a/llvm/test/Verifier/metadata-function-dbg.ll
+++ b/llvm/test/Verifier/metadata-function-dbg.ll
@@ -1,6 +1,11 @@
; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s
-define void @foo() !dbg !4 !dbg !4 {
+define void @foo() !dbg !4 {
+ unreachable
+}
+
+; CHECK: function must have a single !dbg attachment
+define void @foo2() !dbg !4 !dbg !4 {
unreachable
}
OpenPOWER on IntegriCloud