1# RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
2--- |
3  declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
4
5  define void @foo() #1 {
6  entry:
7    %x.i = alloca i8, align 1
8    %y.i = alloca [256 x i8], align 16
9    %0 = bitcast i8* %x.i to i8*
10    br label %for.body
11
12  for.body:
13    %1 = bitcast [256 x i8]* %y.i to i8*
14    call void @llvm.dbg.declare(metadata i8* %0, metadata !4, metadata !7) #3, !dbg !8
15    br label %for.body
16  }
17
18  attributes #0 = { nounwind readnone }
19  attributes #1 = { nounwind ssp uwtable }
20  attributes #3 = { nounwind }
21
22  !llvm.dbg.cu = !{!0}
23  !llvm.module.flags = !{!3}
24
25  !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2)
26  !1 = !DIFile(filename: "t.c", directory: "")
27  !2 = !{}
28  !3 = !{i32 1, !"Debug Info Version", i32 3}
29  !4 = !DILocalVariable(name: "x", scope: !5, file: !1, line: 16, type: !6)
30  !5 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !0)
31  !6 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
32  !7 = !DIExpression()
33  !8 = !DILocation(line: 0, scope: !5)
34...
35---
36name:            foo
37tracksRegLiveness: true
38frameInfo:
39  maxAlignment:    16
40stack:
41  - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16,
42# CHECK: [[@LINE+1]]:28: expected a reference to a 'DILocalVariable' metadata node
43      debug-info-variable: '!8', debug-info-expression: '!7',
44      debug-info-location: '!8' }
45body: |
46  bb.0.entry:
47    successors: %bb.1.for.body
48  bb.1.for.body:
49    successors: %bb.1.for.body
50
51    DBG_VALUE %stack.0.y.i, 0, !4, !7, debug-location !8
52    JMP_1 %bb.1.for.body
53...
54