1 ; RUN: opt -strip-debug < %s -S | FileCheck %s
3 ; CHECK-NOT: call void @llvm.dbg.value
5 source_filename = "test/Transforms/StripSymbols/2010-06-30-StripDebug.ll"
7 @x = common global i32 0, !dbg !0
9 ; Function Attrs: nounwind optsize readnone ssp
10 define void @foo() #0 !dbg !7 {
12 tail call void @llvm.dbg.value(metadata i32 0, metadata !10, metadata !12), !dbg !13
16 ; Function Attrs: nounwind readnone
17 declare void @llvm.dbg.value(metadata, metadata, metadata) #1
19 attributes #0 = { nounwind optsize readnone ssp }
20 attributes #1 = { nounwind readnone }
22 !llvm.module.flags = !{!4}
25 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
26 !1 = !DIGlobalVariable(name: "x", scope: !2, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
27 !2 = !DIFile(filename: "b.c", directory: "/tmp")
28 !3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
29 !4 = !{i32 1, !"Debug Info Version", i32 3}
30 !5 = distinct !DICompileUnit(language: DW_LANG_C89, file: !2, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !6)
32 !7 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !2, file: !2, line: 2, type: !8, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !5)
33 !8 = !DISubroutineType(types: !9)
34 !9 = !{null}!10 = !DILocalVariable(name: "y", scope: !11, file: !2, line: 3, type: !3)!11 = distinct !DILexicalBlock(scope: !7, file: !2, line: 2)!12 = !DIExpression()!13 = !DILocation(line: 3, scope: !11)!14 = !DILocation(line: 4, scope: !11)