type-unique-simple-b.ll 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ; RUN: true
  2. ; ModuleID = 'bar.cpp'
  3. %struct.Base = type { i32 }
  4. ; Function Attrs: nounwind ssp uwtable
  5. define void @_Z1gi(i32 %a) #0 {
  6. entry:
  7. %a.addr = alloca i32, align 4
  8. %t = alloca %struct.Base, align 4
  9. store i32 %a, i32* %a.addr, align 4
  10. call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !18, metadata !DIExpression()), !dbg !19
  11. call void @llvm.dbg.declare(metadata %struct.Base* %t, metadata !20, metadata !DIExpression()), !dbg !21
  12. ret void, !dbg !22
  13. }
  14. ; Function Attrs: nounwind readnone
  15. declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
  16. ; Function Attrs: ssp uwtable
  17. define i32 @main() #2 {
  18. entry:
  19. %retval = alloca i32, align 4
  20. store i32 0, i32* %retval
  21. call void @_Z1fi(i32 0), !dbg !23
  22. call void @_Z1gi(i32 1), !dbg !24
  23. ret i32 0, !dbg !25
  24. }
  25. declare void @_Z1fi(i32) #3
  26. attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
  27. attributes #1 = { nounwind readnone }
  28. attributes #2 = { ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
  29. attributes #3 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
  30. !llvm.dbg.cu = !{!0}
  31. !llvm.module.flags = !{!17, !26}
  32. !0 = !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git c23b1db6268c8e7ce64026d57d1510c1aac200a0) (http://llvm.org/git/llvm.git 09b98fe3978eddefc2145adc1056cf21580ce945)", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !3, subprograms: !9, globals: !2, imports: !2)
  33. !1 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple")
  34. !2 = !{}
  35. !3 = !{!4}
  36. !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Base", line: 1, size: 32, align: 32, file: !5, elements: !6, identifier: "_ZTS4Base")
  37. !5 = !DIFile(filename: "./a.hpp", directory: "/Users/mren/c_testing/type_unique_air/simple")
  38. !6 = !{!7}
  39. !7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !"_ZTS4Base", baseType: !8)
  40. !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
  41. !9 = !{!10, !14}
  42. !10 = !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !11, type: !12, function: void (i32)* @_Z1gi, variables: !2)
  43. !11 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple")
  44. !12 = !DISubroutineType(types: !13)
  45. !13 = !{null, !8}
  46. !14 = !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !11, type: !15, function: i32 ()* @main, variables: !2)
  47. !15 = !DISubroutineType(types: !16)
  48. !16 = !{!8}
  49. !17 = !{i32 2, !"Dwarf Version", i32 2}
  50. !18 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "a", line: 4, arg: 1, scope: !10, file: !11, type: !8)
  51. !19 = !DILocation(line: 4, scope: !10)
  52. !20 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "t", line: 5, scope: !10, file: !11, type: !4)
  53. !21 = !DILocation(line: 5, scope: !10)
  54. !22 = !DILocation(line: 6, scope: !10)
  55. !23 = !DILocation(line: 8, scope: !14)
  56. !24 = !DILocation(line: 9, scope: !14)
  57. !25 = !DILocation(line: 10, scope: !14)
  58. !26 = !{i32 1, !"Debug Info Version", i32 3}