llvm-6502/test/Assembler/mdlexicalblock.ll
Duncan P. N. Exon Smith d3ec0ca17e Verifier: Add operand checks for MDLexicalBlock
Add operand checks for `MDLexicalBlock` and `MDLexicalBlockFile`.  Like
`MDLocalVariable` and `MDLocation`, these nodes always require a scope.

There was no test bitrot to fix here (just updated the serialization
tests in test/Assembler/mdlexicalblock.ll).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233561 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 16:37:48 +00:00

26 lines
1.0 KiB
LLVM

; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
; CHECK: !named = !{!0, !1, !2, !3, !4, !4, !5, !6, !7, !7}
!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9}
!0 = distinct !{}
!1 = !MDSubprogram(name: "foo", scope: !2)
!2 = !MDFile(filename: "path/to/file", directory: "/path/to/dir")
; CHECK: !3 = !MDLexicalBlock(scope: !1, file: !2, line: 7, column: 35)
!3 = !MDLexicalBlock(scope: !1, file: !2, line: 7, column: 35)
; CHECK: !4 = !MDLexicalBlock(scope: !1)
!4 = !MDLexicalBlock(scope: !1)
!5 = !MDLexicalBlock(scope: !1, file: null, line: 0, column: 0)
; CHECK: !5 = !MDLexicalBlockFile(scope: !3, file: !2, discriminator: 0)
; CHECK: !6 = !MDLexicalBlockFile(scope: !3, file: !2, discriminator: 1)
!6 = !MDLexicalBlockFile(scope: !3, file: !2, discriminator: 0)
!7 = !MDLexicalBlockFile(scope: !3, file: !2, discriminator: 1)
; CHECK: !7 = !MDLexicalBlockFile(scope: !3, discriminator: 7)
!8 = !MDLexicalBlockFile(scope: !3, discriminator: 7)
!9 = !MDLexicalBlockFile(scope: !3, file: null, discriminator: 7)