summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/Generic/namespace.ll
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-12-16 04:25:54 +0000
committerAdrian Prantl <aprantl@apple.com>2016-12-16 04:25:54 +0000
commit74a835cda0b0ad6cc58cbecdec1def780b3a4264 (patch)
tree5cf2e05f96282a25b971308647e6870ccc075aff /llvm/test/DebugInfo/Generic/namespace.ll
parentcf634b3eb8ab81e8d57fc183465605fef89f1809 (diff)
downloadbcm5719-llvm-74a835cda0b0ad6cc58cbecdec1def780b3a4264.tar.gz
bcm5719-llvm-74a835cda0b0ad6cc58cbecdec1def780b3a4264.zip
[IR] Remove the DIExpression field from DIGlobalVariable.
This patch implements PR31013 by introducing a DIGlobalVariableExpression that holds a pair of DIGlobalVariable and DIExpression. Currently, DIGlobalVariables holds a DIExpression. This is not the best way to model this: (1) The DIGlobalVariable should describe the source level variable, not how to get to its location. (2) It makes it unsafe/hard to update the expressions when we call replaceExpression on the DIGLobalVariable. (3) It makes it impossible to represent a global variable that is in more than one location (e.g., a variable with multiple DW_OP_LLVM_fragment-s). We also moved away from attaching the DIExpression to DILocalVariable for the same reasons. This reapplies r289902 with additional testcase upgrades. <rdar://problem/29250149> https://llvm.org/bugs/show_bug.cgi?id=31013 Differential Revision: https://reviews.llvm.org/D26769 llvm-svn: 289920
Diffstat (limited to 'llvm/test/DebugInfo/Generic/namespace.ll')
-rw-r--r--llvm/test/DebugInfo/Generic/namespace.ll8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/test/DebugInfo/Generic/namespace.ll b/llvm/test/DebugInfo/Generic/namespace.ll
index b83f7c297a5..c9a259dc700 100644
--- a/llvm/test/DebugInfo/Generic/namespace.ll
+++ b/llvm/test/DebugInfo/Generic/namespace.ll
@@ -200,8 +200,8 @@
; }
; void B::func_fwd() {}
-@_ZN1A1B1iE = global i32 0, align 4, !dbg !31
-@_ZN1A1B7var_fwdE = global i32 0, align 4, !dbg !32
+@_ZN1A1B1iE = global i32 0, align 4, !dbg !131
+@_ZN1A1B7var_fwdE = global i32 0, align 4, !dbg !132
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_debug_info_namespace.cpp, i8* null }]
; Function Attrs: nounwind ssp uwtable
@@ -316,7 +316,7 @@ attributes #1 = { nounwind readnone }
!27 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_debug_info_namespace.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !28, type: !29, variables: !2)
!28 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp")
!29 = !DISubroutineType(types: !2)
-!30 = !{!31, !32}
+!30 = !{!131, !132}
!31 = !DIGlobalVariable(name: "i", linkageName: "_ZN1A1B1iE", line: 20, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13)
!32 = !DIGlobalVariable(name: "var_fwd", linkageName: "_ZN1A1B7var_fwdE", line: 44, isLocal: false, isDefinition: true, scope: !6, file: !18, type: !13)
!33 = !{!34, !35, !36, !37, !40, !41, !42, !43, !44, !45, !47, !48, !49, !51, !54, !55, !56}
@@ -362,3 +362,5 @@ attributes #1 = { nounwind readnone }
!73 = !DILocation(line: 47, column: 21, scope: !26)
!74 = !DILocation(line: 0, scope: !75)
!75 = !DILexicalBlockFile(discriminator: 0, file: !5, scope: !27)
+!131 = !DIGlobalVariableExpression(var: !31)
+!132 = !DIGlobalVariableExpression(var: !32)
OpenPOWER on IntegriCloud