aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-09-17 23:05:07 +0000
committerDevang Patel <dpatel@apple.com>2009-09-17 23:05:07 +0000
commitda795f82a812dd5b3897cf040e91069e89600983 (patch)
tree635f9571a4e904b486f74c00a0aa81b410c5e553 /test
parentf633a065de959b32892c51d741d4db010c5d25b1 (diff)
downloadexternal_llvm-da795f82a812dd5b3897cf040e91069e89600983.zip
external_llvm-da795f82a812dd5b3897cf040e91069e89600983.tar.gz
external_llvm-da795f82a812dd5b3897cf040e91069e89600983.tar.bz2
A testcase!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Feature/md_on_instruction.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Feature/md_on_instruction.ll b/test/Feature/md_on_instruction.ll
new file mode 100644
index 0000000..3fa0b61
--- /dev/null
+++ b/test/Feature/md_on_instruction.ll
@@ -0,0 +1,23 @@
+; RUN: llvm-as < %s -disable-output
+
+define i32 @foo() nounwind ssp {
+entry:
+ %retval = alloca i32 ; <i32*> [#uses=2]
+ call void @llvm.dbg.func.start(metadata !0)
+ store i32 42, i32* %retval, dbg !3
+ br label %0, dbg !3
+
+; <label>:0 ; preds = %entry
+ call void @llvm.dbg.region.end(metadata !0)
+ %1 = load i32* %retval, dbg !3 ; <i32> [#uses=1]
+ ret i32 %1, dbg !3
+}
+
+declare void @llvm.dbg.func.start(metadata) nounwind readnone
+
+declare void @llvm.dbg.region.end(metadata) nounwind readnone
+
+!0 = metadata !{i32 458798, i32 0, metadata !1, metadata !"foo", metadata !"foo", metadata !"foo", metadata !1, i32 1, metadata !2, i1 false, i1 true}
+!1 = metadata !{i32 458769, i32 0, i32 12, metadata !"foo.c", metadata !"/tmp", metadata !"clang 1.0", i1 true, i1 false, metadata !"", i32 0}
+!2 = metadata !{i32 458788, metadata !1, metadata !"int", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5}
+!3 = metadata !{i32 1, i32 13, metadata !1, metadata !1}