1 ; RUN: opt -S -passes=ipsccp %S/undef-type-md.ll | FileCheck %s
2 ; CHECK: llvm.nondebug.metadata = !{[[NONDEBUG_METADATA:![0-9]+]]}
3 ; CHECK: [[NONDEBUG_METADATA]] = !{ptr addrspace(1) @extern_const}
4 ; CHECK: !DITemplateValueParameter({{.*}} value: ptr addrspace(1) @extern_const)
7 source_filename = "test.cpp"
9 %"struct.1" = type <{ float, i32, i8, [3 x i8] }>
10 %"class.1" = type { %"struct.1" }
12 @extern_const = external addrspace(1) constant { { float, i32, i8 } }
14 ; Function Attrs: convergent mustprogress norecurse
15 define linkonce_odr spir_func void @foo() align 2 !dbg !5 {
17 %0 = alloca %"class.1", align 8
22 !llvm.module.flags = !{!3, !4}
23 !llvm.nondebug.metadata= !{!11}
25 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang", isOptimized: true, emissionKind: FullDebug)
26 !1 = !DIFile(filename: "test.cpp", directory: "/path/to")
28 !3 = !{i32 7, !"Dwarf Version", i32 4}
29 !4 = !{i32 2, !"Debug Info Version", i32 3}
30 !5 = distinct !DISubprogram(name: "foo<param>", scope: !1, file: !1, line: 27, type: !6, scopeLine: 27, spFlags: DISPFlagDefinition, unit: !0, templateParams: !8)
31 !6 = !DISubroutineType(types: !7)
34 !9 = !DITemplateValueParameter(name: "S", type: !10, value: ptr addrspace(1) @extern_const)
35 !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
36 !11 = !{ptr addrspace(1) @extern_const}