mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
IR: Give 'DI' prefix to debug info metadata
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
This commit is contained in:
@@ -55,9 +55,9 @@ define void @_Z1biz(i32 %c, ...) #0 {
|
||||
%a = alloca %struct.A, align 1
|
||||
%fptr = alloca void (i32, ...)*, align 8
|
||||
store i32 %c, i32* %1, align 4
|
||||
call void @llvm.dbg.declare(metadata i32* %1, metadata !21, metadata !MDExpression()), !dbg !22
|
||||
call void @llvm.dbg.declare(metadata %struct.A* %a, metadata !23, metadata !MDExpression()), !dbg !24
|
||||
call void @llvm.dbg.declare(metadata void (i32, ...)** %fptr, metadata !25, metadata !MDExpression()), !dbg !27
|
||||
call void @llvm.dbg.declare(metadata i32* %1, metadata !21, metadata !DIExpression()), !dbg !22
|
||||
call void @llvm.dbg.declare(metadata %struct.A* %a, metadata !23, metadata !DIExpression()), !dbg !24
|
||||
call void @llvm.dbg.declare(metadata void (i32, ...)** %fptr, metadata !25, metadata !DIExpression()), !dbg !27
|
||||
store void (i32, ...)* @_Z1biz, void (i32, ...)** %fptr, align 8, !dbg !27
|
||||
ret void, !dbg !28
|
||||
}
|
||||
@@ -72,30 +72,30 @@ attributes #1 = { nounwind readnone }
|
||||
!llvm.module.flags = !{!18, !19}
|
||||
!llvm.ident = !{!20}
|
||||
|
||||
!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !3, subprograms: !13, globals: !2, imports: !2)
|
||||
!1 = !MDFile(filename: "llvm/tools/clang/test/CodeGenCXX/debug-info-varargs.cpp", directory: "radar/13690847")
|
||||
!0 = !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !3, subprograms: !13, globals: !2, imports: !2)
|
||||
!1 = !DIFile(filename: "llvm/tools/clang/test/CodeGenCXX/debug-info-varargs.cpp", directory: "radar/13690847")
|
||||
!2 = !{}
|
||||
!3 = !{!4}
|
||||
!4 = !MDCompositeType(tag: DW_TAG_structure_type, name: "A", line: 3, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A")
|
||||
!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 3, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A")
|
||||
!5 = !{!6}
|
||||
!6 = !MDSubprogram(name: "a", linkageName: "_ZN1A1aEiz", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !7)
|
||||
!7 = !MDSubroutineType(types: !8)
|
||||
!6 = !DISubprogram(name: "a", linkageName: "_ZN1A1aEiz", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !"_ZTS1A", type: !7)
|
||||
!7 = !DISubroutineType(types: !8)
|
||||
!8 = !{null, !9, !10, null}
|
||||
!9 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
|
||||
!10 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
||||
!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
|
||||
!10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
||||
!13 = !{!14}
|
||||
!14 = !MDSubprogram(name: "b", linkageName: "_Z1biz", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !1, scope: !15, type: !16, function: void (i32, ...)* @_Z1biz, variables: !2)
|
||||
!15 = !MDFile(filename: "llvm/tools/clang/test/CodeGenCXX/debug-info-varargs.cpp", directory: "radar/13690847")
|
||||
!16 = !MDSubroutineType(types: !17)
|
||||
!14 = !DISubprogram(name: "b", linkageName: "_Z1biz", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !1, scope: !15, type: !16, function: void (i32, ...)* @_Z1biz, variables: !2)
|
||||
!15 = !DIFile(filename: "llvm/tools/clang/test/CodeGenCXX/debug-info-varargs.cpp", directory: "radar/13690847")
|
||||
!16 = !DISubroutineType(types: !17)
|
||||
!17 = !{null, !10, null}
|
||||
!18 = !{i32 2, !"Dwarf Version", i32 2}
|
||||
!19 = !{i32 1, !"Debug Info Version", i32 3}
|
||||
!20 = !{!"clang version 3.5 "}
|
||||
!21 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 13, arg: 1, scope: !14, file: !15, type: !10)
|
||||
!22 = !MDLocation(line: 13, scope: !14)
|
||||
!23 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "a", line: 16, scope: !14, file: !15, type: !4)
|
||||
!24 = !MDLocation(line: 16, scope: !14)
|
||||
!25 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "fptr", line: 18, scope: !14, file: !15, type: !26)
|
||||
!26 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !16)
|
||||
!27 = !MDLocation(line: 18, scope: !14)
|
||||
!28 = !MDLocation(line: 22, scope: !14)
|
||||
!21 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 13, arg: 1, scope: !14, file: !15, type: !10)
|
||||
!22 = !DILocation(line: 13, scope: !14)
|
||||
!23 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "a", line: 16, scope: !14, file: !15, type: !4)
|
||||
!24 = !DILocation(line: 16, scope: !14)
|
||||
!25 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "fptr", line: 18, scope: !14, file: !15, type: !26)
|
||||
!26 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !16)
|
||||
!27 = !DILocation(line: 18, scope: !14)
|
||||
!28 = !DILocation(line: 22, scope: !14)
|
||||
|
||||
Reference in New Issue
Block a user