diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-20 18:34:53 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-20 18:34:53 +0000 |
commit | 541133b79d3f1078d87e78db4bc6b357d97f113b (patch) | |
tree | f7d354fb132194f4d42bf063998be7fcb766fd97 /llvm/test/Feature | |
parent | 6c428d6ff60dff05c132f389b87bc36feb4afc1b (diff) | |
download | bcm5719-llvm-541133b79d3f1078d87e78db4bc6b357d97f113b.tar.gz bcm5719-llvm-541133b79d3f1078d87e78db4bc6b357d97f113b.zip |
Rewrite test/Feature/md_on_instruction.ll
This test is supposed to be testing whether metadata attachments to
instructions work, but it was using invalid debug info to do so. (This
was causing assertion failures in the `DebugInfoFinder` with a WIP patch
to be more strict about `DIDescriptor` accessors.)
Rather than fix the debug info -- which is better tested elsewhere --
just test the IR feature directly.
llvm-svn: 232828
Diffstat (limited to 'llvm/test/Feature')
-rw-r--r-- | llvm/test/Feature/md_on_instruction.ll | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/llvm/test/Feature/md_on_instruction.ll b/llvm/test/Feature/md_on_instruction.ll index 25fde035f69..e4f9f671170 100644 --- a/llvm/test/Feature/md_on_instruction.ll +++ b/llvm/test/Feature/md_on_instruction.ll @@ -1,27 +1,28 @@ -; RUN: llvm-as < %s | llvm-dis | grep " !dbg " | count 4 +; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s + 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 + ; CHECK: %retval = alloca i32 + ; CHECK: store i32 42, i32* %retval, !md !0 + ; CHECK: br label %0, !md !1 + %retval = alloca i32 + store i32 42, i32* %retval, !md !0 + br label %0, !md !1 -; <label>:0 ; preds = %entry - call void @llvm.dbg.region.end(metadata !0) - %1 = load i32, i32* %retval, !dbg !3 ; <i32> [#uses=1] - ret i32 %1, !dbg !3 +; <label:0> + ; CHECK: %1 = load i32, i32* %retval, !md !2 + ; CHECK: ret i32 %1, !md !3 + %1 = load i32, i32* %retval, !md !2 + ret i32 %1, !md !3 } -declare void @llvm.dbg.func.start(metadata) nounwind readnone - -declare void @llvm.dbg.region.end(metadata) nounwind readnone - -!llvm.module.flags = !{!6} - -!0 = !MDSubprogram(name: "foo", linkageName: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scope: !1, type: !2) -!1 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang 1.0", isOptimized: true, emissionKind: 0, file: !4, enums: !5, retainedTypes: !5, subprograms: !4) -!2 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!3 = !MDLocation(line: 1, column: 13, scope: !1, inlinedAt: !1) -!4 = !MDFile(filename: "foo.c", directory: "/tmp") -!5 = !{i32 0} -!6 = !{i32 1, !"Debug Info Version", i32 3} +; CHECK: !0 = !{} +; CHECK: !1 = distinct !{} +; CHECK: !2 = !{!0} +; CHECK: !3 = !{!4} +; CHECK: !4 = !{!0, !2} +!0 = !{} +!1 = distinct !{} +!2 = !{!0} +!3 = !{!4} +!4 = !{!0, !2} |