summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/StripSymbols
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-29 16:38:44 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-29 16:38:44 +0000
commita9308c49ef421d5fa6c990bc8cbdf500acbffd33 (patch)
tree47dd65fa788567095dea285879afda802522a48d /llvm/test/Transforms/StripSymbols
parent753954873832863c045afe09953c67bf21ed7fc5 (diff)
downloadbcm5719-llvm-a9308c49ef421d5fa6c990bc8cbdf500acbffd33.tar.gz
bcm5719-llvm-a9308c49ef421d5fa6c990bc8cbdf500acbffd33.zip
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. llvm-svn: 236120
Diffstat (limited to 'llvm/test/Transforms/StripSymbols')
-rw-r--r--llvm/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll22
-rw-r--r--llvm/test/Transforms/StripSymbols/2010-08-25-crash.ll20
-rw-r--r--llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll42
3 files changed, 42 insertions, 42 deletions
diff --git a/llvm/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll b/llvm/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll
index 23c8a5810a6..3b1fd74b981 100644
--- a/llvm/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll
+++ b/llvm/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll
@@ -18,17 +18,17 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!llvm.dbg.lv.foo = !{!5}
!llvm.dbg.gv = !{!8}
-!0 = !MDSubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !12, scope: !1, type: !3, function: void ()* @foo)
-!1 = !MDFile(filename: "b.c", directory: "/tmp")
-!2 = !MDCompileUnit(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)
-!3 = !MDSubroutineType(types: !4)
+!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)
+!1 = !DIFile(filename: "b.c", directory: "/tmp")
+!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)
+!3 = !DISubroutineType(types: !4)
!4 = !{null}
-!5 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "y", line: 3, scope: !6, file: !1, type: !7)
-!6 = distinct !MDLexicalBlock(line: 2, column: 0, file: !12, scope: !0)
-!7 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !MDGlobalVariable(name: "x", line: 1, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !7, variable: i32* @x)
+!5 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "y", line: 3, scope: !6, file: !1, type: !7)
+!6 = distinct !DILexicalBlock(line: 2, column: 0, file: !12, scope: !0)
+!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!8 = !DIGlobalVariable(name: "x", line: 1, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !7, variable: i32* @x)
!9 = !{i32 0}
-!10 = !MDLocation(line: 3, scope: !6)
-!11 = !MDLocation(line: 4, scope: !6)
-!12 = !MDFile(filename: "b.c", directory: "/tmp")
+!10 = !DILocation(line: 3, scope: !6)
+!11 = !DILocation(line: 4, scope: !6)
+!12 = !DIFile(filename: "b.c", directory: "/tmp")
!13 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/Transforms/StripSymbols/2010-08-25-crash.ll b/llvm/test/Transforms/StripSymbols/2010-08-25-crash.ll
index 7fd3bcc4f51..f77ed11d912 100644
--- a/llvm/test/Transforms/StripSymbols/2010-08-25-crash.ll
+++ b/llvm/test/Transforms/StripSymbols/2010-08-25-crash.ll
@@ -7,17 +7,17 @@ entry:
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!14}
-!0 = !MDSubprogram(name: "foo", linkageName: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: !1, type: !3, function: i32 ()* @foo)
-!1 = !MDFile(filename: "/tmp/a.c", directory: "/Volumes/Lalgate/clean/D.CW")
-!2 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 2.8 (trunk 112062)", isOptimized: true, emissionKind: 1, file: !10, enums: !11, retainedTypes: !11, subprograms: !12, globals: !13)
-!3 = !MDSubroutineType(types: !4)
+!0 = !DISubprogram(name: "foo", linkageName: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: !1, type: !3, function: i32 ()* @foo)
+!1 = !DIFile(filename: "/tmp/a.c", directory: "/Volumes/Lalgate/clean/D.CW")
+!2 = !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.8 (trunk 112062)", isOptimized: true, emissionKind: 1, file: !10, enums: !11, retainedTypes: !11, subprograms: !12, globals: !13)
+!3 = !DISubroutineType(types: !4)
!4 = !{!5}
-!5 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!6 = !MDGlobalVariable(name: "i", linkageName: "i", line: 2, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !7)
-!7 = !MDDerivedType(tag: DW_TAG_const_type, file: !10, scope: !1, baseType: !5)
-!8 = !MDLocation(line: 3, column: 13, scope: !9)
-!9 = distinct !MDLexicalBlock(line: 3, column: 11, file: !10, scope: !0)
-!10 = !MDFile(filename: "/tmp/a.c", directory: "/Volumes/Lalgate/clean/D.CW")
+!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!6 = !DIGlobalVariable(name: "i", linkageName: "i", line: 2, isLocal: true, isDefinition: true, scope: !1, file: !1, type: !7)
+!7 = !DIDerivedType(tag: DW_TAG_const_type, file: !10, scope: !1, baseType: !5)
+!8 = !DILocation(line: 3, column: 13, scope: !9)
+!9 = distinct !DILexicalBlock(line: 3, column: 11, file: !10, scope: !0)
+!10 = !DIFile(filename: "/tmp/a.c", directory: "/Volumes/Lalgate/clean/D.CW")
!11 = !{}
!12 = !{!0}
!13 = !{!6}
diff --git a/llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll b/llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll
index d9511b8cb4a..08eff003dfc 100644
--- a/llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll
+++ b/llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll
@@ -18,7 +18,7 @@ entry:
; Function Attrs: nounwind readonly ssp
define i32 @foo(i32 %i) #2 {
entry:
- tail call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !15, metadata !MDExpression()), !dbg !20
+ tail call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !15, metadata !DIExpression()), !dbg !20
%.0 = load i32, i32* @xyz, align 4
ret i32 %.0, !dbg !21
}
@@ -30,29 +30,29 @@ attributes #2 = { nounwind readonly ssp }
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!25}
-!0 = !MDCompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 1, file: !1, enums: !{}, retainedTypes: !{}, subprograms: !23, globals: !24)
-!1 = !MDFile(filename: "g.c", directory: "/tmp/")
+!0 = !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 1, file: !1, enums: !{}, retainedTypes: !{}, subprograms: !23, globals: !24)
+!1 = !DIFile(filename: "g.c", directory: "/tmp/")
!2 = !{null}
-!3 = !MDSubprogram(name: "bar", line: 5, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !4)
-!4 = !MDSubroutineType(types: !2)
-!5 = !MDFile(filename: "g.c", directory: "/tmp/")
-!6 = !MDSubprogram(name: "fn", linkageName: "fn", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !7, function: i32 ()* @fn)
-!7 = !MDSubroutineType(types: !8)
+!3 = !DISubprogram(name: "bar", line: 5, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !4)
+!4 = !DISubroutineType(types: !2)
+!5 = !DIFile(filename: "g.c", directory: "/tmp/")
+!6 = !DISubprogram(name: "fn", linkageName: "fn", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !7, function: i32 ()* @fn)
+!7 = !DISubroutineType(types: !8)
!8 = !{!9}
-!9 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !MDSubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !11, function: i32 (i32)* @foo)
-!11 = !MDSubroutineType(types: !12)
+!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!10 = !DISubprogram(name: "foo", linkageName: "foo", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: null, type: !11, function: i32 (i32)* @foo)
+!11 = !DISubroutineType(types: !12)
!12 = !{!9, !9}
-!13 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "bb", line: 5, scope: !14, file: !5, type: !9)
-!14 = distinct !MDLexicalBlock(line: 5, column: 0, file: !1, scope: !3)
-!15 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 7, arg: 0, scope: !10, file: !5, type: !9)
-!16 = !MDGlobalVariable(name: "abcd", line: 2, isLocal: true, isDefinition: true, scope: !5, file: !5, type: !9)
-!17 = !MDGlobalVariable(name: "xyz", line: 3, isLocal: false, isDefinition: true, scope: !5, file: !5, type: !9, variable: i32* @xyz)
-!18 = !MDLocation(line: 6, scope: !19)
-!19 = distinct !MDLexicalBlock(line: 6, column: 0, file: !1, scope: !6)
-!20 = !MDLocation(line: 7, scope: !10)
-!21 = !MDLocation(line: 10, scope: !22)
-!22 = distinct !MDLexicalBlock(line: 7, column: 0, file: !1, scope: !10)
+!13 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "bb", line: 5, scope: !14, file: !5, type: !9)
+!14 = distinct !DILexicalBlock(line: 5, column: 0, file: !1, scope: !3)
+!15 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 7, arg: 0, scope: !10, file: !5, type: !9)
+!16 = !DIGlobalVariable(name: "abcd", line: 2, isLocal: true, isDefinition: true, scope: !5, file: !5, type: !9)
+!17 = !DIGlobalVariable(name: "xyz", line: 3, isLocal: false, isDefinition: true, scope: !5, file: !5, type: !9, variable: i32* @xyz)
+!18 = !DILocation(line: 6, scope: !19)
+!19 = distinct !DILexicalBlock(line: 6, column: 0, file: !1, scope: !6)
+!20 = !DILocation(line: 7, scope: !10)
+!21 = !DILocation(line: 10, scope: !22)
+!22 = distinct !DILexicalBlock(line: 7, column: 0, file: !1, scope: !10)
!23 = !{!3, !6, !10}
!24 = !{!16, !17}
!25 = !{i32 1, !"Debug Info Version", i32 3}
OpenPOWER on IntegriCloud