Renumber testcase metadata nodes after r290153.
This patch renumbers the metadata nodes in debug info testcases after
https://reviews.llvm.org/D26769. This is a separate patch because it
causes so much churn. This was implemented with a python script that
pipes the testcases through llvm-as - | llvm-dis - and then goes
through the original and new output side-by side to insert all
comments at a close-enough location.
Differential Revision: https://reviews.llvm.org/D27765
llvm-svn: 290292
diff --git a/llvm/test/DebugInfo/X86/debug-loc-frame.ll b/llvm/test/DebugInfo/X86/debug-loc-frame.ll
index f86ea57..d7188a2 100644
--- a/llvm/test/DebugInfo/X86/debug-loc-frame.ll
+++ b/llvm/test/DebugInfo/X86/debug-loc-frame.ll
@@ -42,73 +42,80 @@
; ModuleID = 'frame.c'
source_filename = "frame.c"
-@data = global i32 17, align 4, !dbg !4
+@data = global i32 17, align 4, !dbg !0
@sum = local_unnamed_addr global i32 0, align 4, !dbg !6
-@zero = local_unnamed_addr global i32 0, align 4, !dbg !7
-@ptr = common local_unnamed_addr global i32* null, align 8, !dbg !8
+@zero = local_unnamed_addr global i32 0, align 4, !dbg !9
+@ptr = common local_unnamed_addr global i32* null, align 8, !dbg !11
-; Function Attrs: nounwind uwtable
-define i32 @main() local_unnamed_addr !dbg !13 {
+define i32 @main() local_unnamed_addr !dbg !17 {
entry:
%val = alloca i32, align 4
- %0 = bitcast i32* %val to i8*, !dbg !18
- call void @llvm.lifetime.start(i64 4, i8* %0), !dbg !18
- %1 = load i32, i32* @data, align 4, !dbg !19, !tbaa !20
- tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !17, metadata !24), !dbg !25
- store i32 %1, i32* %val, align 4, !dbg !26, !tbaa !20
- tail call void @llvm.dbg.value(metadata i32* %val, i64 0, metadata !17, metadata !27), !dbg !25
- call void @foo(i32 1, i32* nonnull %val), !dbg !28
- call void @foo(i32 2, i32* nonnull @data), !dbg !29
- %2 = load i32, i32* @zero, align 4, !dbg !30, !tbaa !20
- call void @llvm.lifetime.end(i64 4, i8* %0), !dbg !31
- ret i32 %2, !dbg !32
+ %0 = bitcast i32* %val to i8*, !dbg !22
+ call void @llvm.lifetime.start(i64 4, i8* %0), !dbg !22
+ %1 = load i32, i32* @data, align 4, !dbg !23, !tbaa !24
+ tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !21, metadata !28), !dbg !29
+ store i32 %1, i32* %val, align 4, !dbg !30, !tbaa !24
+ tail call void @llvm.dbg.value(metadata i32* %val, i64 0, metadata !21, metadata !31), !dbg !29
+ call void @foo(i32 1, i32* nonnull %val), !dbg !32
+ call void @foo(i32 2, i32* nonnull @data), !dbg !33
+ %2 = load i32, i32* @zero, align 4, !dbg !34, !tbaa !24
+ call void @llvm.lifetime.end(i64 4, i8* %0), !dbg !35
+ ret i32 %2, !dbg !36
}
; Function Attrs: argmemonly nounwind
-declare void @llvm.lifetime.start(i64, i8* nocapture)
+declare void @llvm.lifetime.start(i64, i8* nocapture) #0
declare void @foo(i32, i32*) local_unnamed_addr
; Function Attrs: argmemonly nounwind
-declare void @llvm.lifetime.end(i64, i8* nocapture)
+declare void @llvm.lifetime.end(i64, i8* nocapture) #0
; Function Attrs: nounwind readnone
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!10, !11}
-!llvm.ident = !{!12}
+attributes #0 = { argmemonly nounwind }
+attributes #1 = { nounwind readnone }
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 273961)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3)
-!1 = !DIFile(filename: "frame.c", directory: "/home/user/test")
-!2 = !{}
-!3 = !{!4, !6, !7, !8}
-!4 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "data", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true))
-!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!6 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "sum", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true))
-!7 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "zero", scope: !0, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true))
-!8 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "ptr", scope: !0, file: !1, line: 4, type: !9, isLocal: false, isDefinition: true))
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64, align: 64)
-!10 = !{i32 2, !"Dwarf Version", i32 4}
-!11 = !{i32 2, !"Debug Info Version", i32 3}
-!12 = !{!"clang version 3.9.0 (trunk 273961)"}
-!13 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 8, type: !14, isLocal: false, isDefinition: true, scopeLine: 9, isOptimized: true, unit: !0, variables: !16)
-!14 = !DISubroutineType(types: !15)
-!15 = !{!5}
-!16 = !{!17}
-!17 = !DILocalVariable(name: "val", scope: !13, file: !1, line: 10, type: !5)
-!18 = !DILocation(line: 10, column: 3, scope: !13)
-!19 = !DILocation(line: 11, column: 9, scope: !13)
-!20 = !{!21, !21, i64 0}
-!21 = !{!"int", !22, i64 0}
-!22 = !{!"omnipotent char", !23, i64 0}
-!23 = !{!"Simple C/C++ TBAA"}
-!24 = !DIExpression()
-!25 = !DILocation(line: 10, column: 7, scope: !13)
-!26 = !DILocation(line: 11, column: 7, scope: !13)
-!27 = !DIExpression(DW_OP_deref)
-!28 = !DILocation(line: 12, column: 3, scope: !13)
-!29 = !DILocation(line: 13, column: 3, scope: !13)
-!30 = !DILocation(line: 14, column: 10, scope: !13)
-!31 = !DILocation(line: 15, column: 1, scope: !13)
-!32 = !DILocation(line: 14, column: 3, scope: !13)
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!14, !15}
+!llvm.ident = !{!16}
+
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "data", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.9.0 (trunk 273961)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "frame.c", directory: "/home/user/test")
+!4 = !{}
+!5 = !{!0, !6, !9, !11}
+!6 = distinct !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "sum", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true)
+!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!9 = distinct !DIGlobalVariableExpression(var: !10)
+!10 = !DIGlobalVariable(name: "zero", scope: !2, file: !3, line: 3, type: !8, isLocal: false, isDefinition: true)
+!11 = distinct !DIGlobalVariableExpression(var: !12)
+!12 = !DIGlobalVariable(name: "ptr", scope: !2, file: !3, line: 4, type: !13, isLocal: false, isDefinition: true)
+!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, align: 64)
+!14 = !{i32 2, !"Dwarf Version", i32 4}
+!15 = !{i32 2, !"Debug Info Version", i32 3}
+!16 = !{!"clang version 3.9.0 (trunk 273961)"}
+!17 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 8, type: !18, isLocal: false, isDefinition: true, scopeLine: 9, isOptimized: true, unit: !2, variables: !20)
+!18 = !DISubroutineType(types: !19)
+!19 = !{!8}
+!20 = !{!21}
+!21 = !DILocalVariable(name: "val", scope: !17, file: !3, line: 10, type: !8)
+!22 = !DILocation(line: 10, column: 3, scope: !17)
+!23 = !DILocation(line: 11, column: 9, scope: !17)
+!24 = !{!25, !25, i64 0}
+!25 = !{!"int", !26, i64 0}
+!26 = !{!"omnipotent char", !27, i64 0}
+!27 = !{!"Simple C/C++ TBAA"}
+!28 = !DIExpression()
+!29 = !DILocation(line: 10, column: 7, scope: !17)
+!30 = !DILocation(line: 11, column: 7, scope: !17)
+!31 = !DIExpression(DW_OP_deref)
+!32 = !DILocation(line: 12, column: 3, scope: !17)
+!33 = !DILocation(line: 13, column: 3, scope: !17)
+!34 = !DILocation(line: 14, column: 10, scope: !17)
+!35 = !DILocation(line: 15, column: 1, scope: !17)
+!36 = !DILocation(line: 14, column: 3, scope: !17)
+