diff options
| author | Adrian Prantl <aprantl@apple.com> | 2016-12-16 19:39:01 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2016-12-16 19:39:01 +0000 |
| commit | 73ec065604a8ff2512f478fb763eaa4f9c2bf354 (patch) | |
| tree | 51d4abac2d0ddd62eff9bc43ea30b15d3486fa48 /llvm/test/Linker | |
| parent | d0fffd1d1405823e4dc1a4ad16e007e3bdd4bf69 (diff) | |
| download | bcm5719-llvm-73ec065604a8ff2512f478fb763eaa4f9c2bf354.tar.gz bcm5719-llvm-73ec065604a8ff2512f478fb763eaa4f9c2bf354.zip | |
Revert "[IR] Remove the DIExpression field from DIGlobalVariable."
This reverts commit 289920 (again).
I forgot to implement a Bitcode upgrade for the case where a DIGlobalVariable
has not DIExpression. Unfortunately it is not possible to safely upgrade
these variables without adding a flag to the bitcode record indicating which
version they are.
My plan of record is to roll the planned follow-up patch that adds a
unit: field to DIGlobalVariable into this patch before recomitting.
This way we only need one Bitcode upgrade for both changes (with a
version flag in the bitcode record to safely distinguish the record
formats).
Sorry for the churn!
llvm-svn: 289982
Diffstat (limited to 'llvm/test/Linker')
| -rw-r--r-- | llvm/test/Linker/2011-08-04-Metadata.ll | 12 | ||||
| -rw-r--r-- | llvm/test/Linker/2011-08-04-Metadata2.ll | 2 | ||||
| -rw-r--r-- | llvm/test/Linker/debug-info-global-var.ll | 6 | ||||
| -rw-r--r-- | llvm/test/Linker/odr.ll | 2 | ||||
| -rw-r--r-- | llvm/test/Linker/only-needed-debug-metadata.ll | 4 |
5 files changed, 11 insertions, 15 deletions
diff --git a/llvm/test/Linker/2011-08-04-Metadata.ll b/llvm/test/Linker/2011-08-04-Metadata.ll index 95eb0c68ea2..bbcc3fc7807 100644 --- a/llvm/test/Linker/2011-08-04-Metadata.ll +++ b/llvm/test/Linker/2011-08-04-Metadata.ll @@ -5,12 +5,10 @@ ; CHECK: @x = internal global i32 0, align 4, !dbg [[DI1:![0-9]+]] ; CHECK: @x.1 = internal global i32 0, align 4, !dbg [[DI2:![0-9]+]] -; CHECK: [[DI1]] = !DIGlobalVariableExpression(var: [[V1:.*]]) -; CHECK: [[V1]] = !DIGlobalVariable(name: "x", -; CHECK-NOT: linkageName: -; CHECK: [[DI2]] = !DIGlobalVariableExpression(var: [[V2:.*]]) -; CHECK: [[V2]] = !DIGlobalVariable(name: "x", -; CHECK-NOT: linkageName: +; CHECK: [[DI1]] = !DIGlobalVariable(name: "x", +; CHECK-NOT: linkageName: +; CHECK: [[DI2]] = !DIGlobalVariable(name: "x", +; CHECK-NOT: linkageName: target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-apple-macosx10.7.0" @@ -30,7 +28,7 @@ entry: !2 = !DIFile(filename: "/tmp/one.c", directory: "/Volumes/Lalgate/Slate/D") !3 = !DISubroutineType(types: !4) !4 = !{null} -!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", line: 2, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !6)) +!5 = !DIGlobalVariable(name: "x", line: 2, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !6) !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !DILocation(line: 3, column: 14, scope: !8) !8 = distinct !DILexicalBlock(line: 3, column: 12, file: !9, scope: !1) diff --git a/llvm/test/Linker/2011-08-04-Metadata2.ll b/llvm/test/Linker/2011-08-04-Metadata2.ll index 34bd0888e3a..f15a8414089 100644 --- a/llvm/test/Linker/2011-08-04-Metadata2.ll +++ b/llvm/test/Linker/2011-08-04-Metadata2.ll @@ -22,7 +22,7 @@ entry: !2 = !DIFile(filename: "/tmp/two.c", directory: "/Volumes/Lalgate/Slate/D") !3 = !DISubroutineType(types: !4) !4 = !{null} -!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", line: 1, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !6)) +!5 = !DIGlobalVariable(name: "x", line: 1, isLocal: true, isDefinition: true, scope: !0, file: !2, type: !6) !6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) !7 = !DILocation(line: 2, column: 14, scope: !8) !8 = distinct !DILexicalBlock(line: 2, column: 12, file: !9, scope: !1) diff --git a/llvm/test/Linker/debug-info-global-var.ll b/llvm/test/Linker/debug-info-global-var.ll index 196e57494d3..a5bff74b159 100644 --- a/llvm/test/Linker/debug-info-global-var.ll +++ b/llvm/test/Linker/debug-info-global-var.ll @@ -10,9 +10,8 @@ target triple = "x86_64-apple-macosx10.12.0" !llvm.module.flags = !{!6, !7, !8} !llvm.ident = !{!9} -; CHECK: ![[G]] = !DIGlobalVariableExpression(var: ![[GVAR:.*]]) -; CHECK: ![[GVAR]] = distinct !DIGlobalVariable(name: "g" -!0 = !DIGlobalVariableExpression(var: !10) +; CHECK: ![[G]] = distinct !DIGlobalVariable(name: "g" +!0 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true) !1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4) !2 = !DIFile(filename: "debug-info-global-var.c", directory: "/") !3 = !{} @@ -22,4 +21,3 @@ target triple = "x86_64-apple-macosx10.12.0" !7 = !{i32 2, !"Debug Info Version", i32 3} !8 = !{i32 1, !"PIC Level", i32 2} !9 = !{!"clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)"} -!10 = distinct !DIGlobalVariable(name: "g", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true) diff --git a/llvm/test/Linker/odr.ll b/llvm/test/Linker/odr.ll index cca42d69e8a..a3ca855fa5f 100644 --- a/llvm/test/Linker/odr.ll +++ b/llvm/test/Linker/odr.ll @@ -14,5 +14,5 @@ !3 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !4, file: !1, identifier: "zed") !4 = distinct !DISubprogram(name: "b", scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !0) !5 = !{!6} -!6 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "c", scope: null, isLocal: false, isDefinition: true)) +!6 = distinct !DIGlobalVariable(name: "c", scope: null, isLocal: false, isDefinition: true) !7 = !{i32 2, !"Debug Info Version", i32 3} diff --git a/llvm/test/Linker/only-needed-debug-metadata.ll b/llvm/test/Linker/only-needed-debug-metadata.ll index 216c20cf732..2d1949fb0ec 100644 --- a/llvm/test/Linker/only-needed-debug-metadata.ll +++ b/llvm/test/Linker/only-needed-debug-metadata.ll @@ -38,8 +38,8 @@ define i32 @unused() !dbg !10 { !11 = !DISubroutineType(types: !12) !12 = !{!7} !13 = !{!14, !15} -!14 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "X", scope: !0, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true)) -!15 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "U", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true)) +!14 = !DIGlobalVariable(name: "X", scope: !0, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true) +!15 = !DIGlobalVariable(name: "U", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true) !16 = !{i32 2, !"Dwarf Version", i32 4} !17 = !{i32 2, !"Debug Info Version", i32 3} !18 = !{!"clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)"} |

