File: invalid-metadata-node-type.mir

package info (click to toggle)
llvm-toolchain-6.0 1%3A6.0.1-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 598,080 kB
  • sloc: cpp: 3,046,253; ansic: 595,057; asm: 271,965; python: 128,926; objc: 106,554; sh: 21,906; lisp: 10,191; pascal: 6,094; ml: 5,544; perl: 5,265; makefile: 2,227; cs: 2,027; xml: 686; php: 212; csh: 117
file content (52 lines) | stat: -rw-r--r-- 1,751 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
--- |
  declare void @llvm.dbg.declare(metadata, metadata, metadata) #0

  define void @foo() #1 {
  entry:
    %x.i = alloca i8, align 1
    %y.i = alloca [256 x i8], align 16
    %0 = bitcast i8* %x.i to i8*
    br label %for.body

  for.body:
    %1 = bitcast [256 x i8]* %y.i to i8*
    call void @llvm.dbg.declare(metadata i8* %0, metadata !4, metadata !7) #3, !dbg !8
    br label %for.body
  }

  attributes #0 = { nounwind readnone }
  attributes #1 = { nounwind ssp uwtable }
  attributes #3 = { nounwind }

  !llvm.dbg.cu = !{!0}
  !llvm.module.flags = !{!3}

  !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2)
  !1 = !DIFile(filename: "t.c", directory: "")
  !2 = !{}
  !3 = !{i32 1, !"Debug Info Version", i32 3}
  !4 = !DILocalVariable(name: "x", scope: !5, file: !1, line: 16, type: !6)
  !5 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !0)
  !6 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
  !7 = !DIExpression()
  !8 = !DILocation(line: 0, scope: !5)
...
---
name:            foo
tracksRegLiveness: true
frameInfo:
  maxAlignment:    16
stack:
# CHECK: [[@LINE+1]]:75: expected a reference to a 'DILocalVariable' metadata node
  - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!8',
      di-expression: '!7', di-location: '!8' }
body: |
  bb.0.entry:
    successors: %bb.1.for.body
  bb.1.for.body:
    successors: %bb.1.for.body

    DBG_VALUE %stack.0.y.i, 0, !4, !7, debug-location !8
    JMP_1 %bb.1.for.body
...