aboutsummaryrefslogtreecommitdiff
path: root/test/Assembler/functionlocal-metadata.ll
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2010-01-05 22:22:14 +0000
committerVictor Hernandez <vhernandez@apple.com>2010-01-05 22:22:14 +0000
commitbf170d4c2ffd9dc99fad1fabfbf1f90f980a9782 (patch)
treeabeb38e93face65578a32e67a86a335427484564 /test/Assembler/functionlocal-metadata.ll
parent7a34d6c450035dad9d494502c7c742137c42958e (diff)
Re-add parsing of function-local metadata; this time with testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler/functionlocal-metadata.ll')
-rw-r--r--test/Assembler/functionlocal-metadata.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Assembler/functionlocal-metadata.ll b/test/Assembler/functionlocal-metadata.ll
new file mode 100644
index 0000000000..86beb1c0c7
--- /dev/null
+++ b/test/Assembler/functionlocal-metadata.ll
@@ -0,0 +1,22 @@
+; RUN: llvm-as < %s | llvm-dis | grep {ret void, !foo !0, !bar !1}
+
+define void @Foo(i32 %a, i32 %b) {
+entry:
+ %0 = add i32 %a, 1 ; <i32> [#uses=1]
+ %two = add i32 %b, 2 ; <i32> [#uses=2]
+
+ call void @llvm.dbg.func.start(metadata !{i32 %0})
+ call void @llvm.dbg.func.start(metadata !{i32 %b, i32 %0})
+ call void @llvm.dbg.func.start(metadata !{i32 %a, metadata !"foo"})
+ call void @llvm.dbg.func.start(metadata !{metadata !0, i32 %two})
+
+ ret void, !foo !0, !bar !1
+}
+
+!0 = metadata !{i32 662302, i32 26, metadata !1, null}
+!1 = metadata !{i32 4, metadata !"foo"}
+
+declare void @llvm.dbg.func.start(metadata) nounwind readnone
+
+!foo = !{ !0 }
+!bar = !{ !1 }