1 # RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
3 declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
5 define void @foo() #1 {
7 %x.i = alloca i8, align 1
8 %y.i = alloca [256 x i8], align 16
9 %0 = bitcast i8* %x.i to i8*
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
18 attributes #0 = { nounwind readnone }
19 attributes #1 = { nounwind ssp uwtable }
20 attributes #3 = { nounwind }
23 !llvm.module.flags = !{!3}
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: "")
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)
33 !8 = !DILocation(line: 0, scope: !5)
37 tracksRegLiveness: true
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' }
47 successors: %bb.1.for.body
49 successors: %bb.1.for.body
51 DBG_VALUE %stack.0.y.i, 0, !4, !7, debug-location !8