2010-06-30-StripDebug.ll 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. ; RUN: opt -strip-debug < %s -S | FileCheck %s
  2. ; CHECK-NOT: llvm.dbg
  3. @x = common global i32 0 ; <i32*> [#uses=0]
  4. define void @foo() nounwind readnone optsize ssp {
  5. entry:
  6. tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !5, metadata !{}), !dbg !10
  7. ret void, !dbg !11
  8. }
  9. declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
  10. !llvm.dbg.cu = !{!2}
  11. !llvm.module.flags = !{!13}
  12. !llvm.dbg.sp = !{!0}
  13. !llvm.dbg.lv.foo = !{!5}
  14. !llvm.dbg.gv = !{!8}
  15. !0 = !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !12, scope: !1, type: !3, function: void ()* @foo)
  16. !1 = !DIFile(filename: "b.c", directory: "/tmp")
  17. !2 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 0, file: !12, enums: !4, retainedTypes: !4)
  18. !3 = !DISubroutineType(types: !4)
  19. !4 = !{null}
  20. !5 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "y", line: 3, scope: !6, file: !1, type: !7)
  21. !6 = distinct !DILexicalBlock(line: 2, column: 0, file: !12, scope: !0)
  22. !7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
  23. !8 = !DIGlobalVariable(name: "x", line: 1, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !7, variable: i32* @x)
  24. !9 = !{i32 0}
  25. !10 = !DILocation(line: 3, scope: !6)
  26. !11 = !DILocation(line: 4, scope: !6)
  27. !12 = !DIFile(filename: "b.c", directory: "/tmp")
  28. !13 = !{i32 1, !"Debug Info Version", i32 3}