mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
e56023a059
Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week. Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course. Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph). Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236120 91177308-0d34-0410-b5e6-96231b3b80d8
60 lines
3.3 KiB
LLVM
60 lines
3.3 KiB
LLVM
; RUN: llc -O0 -mtriple=x86_64-linux-gnu %s -o %t -filetype=obj
|
|
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
|
|
|
|
; Verify that we've emitted template arguments for the union
|
|
; CHECK: DW_TAG_union_type
|
|
; CHECK-NEXT: "Value<float>"
|
|
; CHECK: DW_TAG_template_type_parameter
|
|
; CHECK: "T"
|
|
|
|
%"union.PR15637::Value" = type { i32 }
|
|
|
|
@_ZN7PR156371fE = global %"union.PR15637::Value" zeroinitializer, align 4
|
|
|
|
define void @_ZN7PR156371gEf(float %value) #0 {
|
|
entry:
|
|
%value.addr = alloca float, align 4
|
|
%tempValue = alloca %"union.PR15637::Value", align 4
|
|
store float %value, float* %value.addr, align 4
|
|
call void @llvm.dbg.declare(metadata float* %value.addr, metadata !23, metadata !DIExpression()), !dbg !24
|
|
call void @llvm.dbg.declare(metadata %"union.PR15637::Value"* %tempValue, metadata !25, metadata !DIExpression()), !dbg !26
|
|
ret void, !dbg !27
|
|
}
|
|
|
|
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
|
|
|
|
attributes #0 = { nounwind }
|
|
attributes #1 = { nounwind readnone }
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!28}
|
|
|
|
!0 = !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 178499) (llvm/trunk 178472)", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !9, imports: !2)
|
|
!1 = !DIFile(filename: "foo.cc", directory: "/usr/local/google/home/echristo/tmp")
|
|
!2 = !{}
|
|
!3 = !{!4}
|
|
!4 = !DISubprogram(name: "g", linkageName: "_ZN7PR156371gEf", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: void (float)* @_ZN7PR156371gEf, variables: !2)
|
|
!5 = !DINamespace(name: "PR15637", line: 1, file: !1, scope: null)
|
|
!6 = !DISubroutineType(types: !7)
|
|
!7 = !{null, !8}
|
|
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
|
|
!9 = !{!10}
|
|
!10 = !DIGlobalVariable(name: "f", linkageName: "_ZN7PR156371fE", line: 6, isLocal: false, isDefinition: true, scope: !5, file: !11, type: !12, variable: %"union.PR15637::Value"* @_ZN7PR156371fE)
|
|
!11 = !DIFile(filename: "foo.cc", directory: "/usr/local/google/home/echristo/tmp")
|
|
!12 = !DICompositeType(tag: DW_TAG_union_type, name: "Value<float>", line: 2, size: 32, align: 32, file: !1, scope: !5, elements: !13, templateParams: !21)
|
|
!13 = !{!14, !16}
|
|
!14 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !12, baseType: !15)
|
|
!15 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
!16 = !DISubprogram(name: "Value", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !12, type: !17)
|
|
!17 = !DISubroutineType(types: !18)
|
|
!18 = !{null, !19}
|
|
!19 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12)
|
|
!21 = !{!22}
|
|
!22 = !DITemplateTypeParameter(name: "T", type: !8)
|
|
!23 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 3, arg: 1, scope: !4, file: !11, type: !8)
|
|
!24 = !DILocation(line: 3, scope: !4)
|
|
!25 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "tempValue", line: 4, scope: !4, file: !11, type: !12)
|
|
!26 = !DILocation(line: 4, scope: !4)
|
|
!27 = !DILocation(line: 5, scope: !4)
|
|
!28 = !{i32 1, !"Debug Info Version", i32 3}
|