diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-08-30 18:06:51 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-08-30 18:06:51 +0000 |
commit | 69e607f200faf0384a737bd8db69f29e51e1b378 (patch) | |
tree | 2623b1ea8144906eaa3c8707e47d05fdf46b2783 /test/LTO | |
parent | ec6b6f4e7ad864820eb26875edf94f28c466e053 (diff) |
Canonicalize the representation of empty an expression in DIGlobalVariableExpression
This change simplifies code that has to deal with
DIGlobalVariableExpression and mirrors how we treat DIExpressions in
debug info intrinsics. Before this change there were two ways of
representing empty expressions on globals, a nullptr and an empty
!DIExpression().
If someone needs to upgrade out-of-tree testcases:
perl -pi -e 's/(!DIGlobalVariableExpression\(var: ![0-9]*)\)/\1, expr: !DIExpression())/g' <MYTEST.ll>
will catch 95%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LTO')
-rw-r--r-- | test/LTO/X86/Inputs/type-mapping-src.ll | 2 | ||||
-rw-r--r-- | test/LTO/X86/type-mapping-bug.ll | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/LTO/X86/Inputs/type-mapping-src.ll b/test/LTO/X86/Inputs/type-mapping-src.ll index fc47cabaa16..94f108d6bb8 100644 --- a/test/LTO/X86/Inputs/type-mapping-src.ll +++ b/test/LTO/X86/Inputs/type-mapping-src.ll @@ -10,7 +10,7 @@ target triple = "x86_64-pc-windows-msvc18.0.0" !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!8} -!0 = !DIGlobalVariableExpression(var: !1) +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) !1 = !DIGlobalVariable(name: "bar", linkageName: "bar", scope: !2, file: !3, line: 2, type: !6, isLocal: false, isDefinition: true) !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) !3 = !DIFile(filename: "b", directory: "/") diff --git a/test/LTO/X86/type-mapping-bug.ll b/test/LTO/X86/type-mapping-bug.ll index 84c6939fb15..095e7cf1f88 100644 --- a/test/LTO/X86/type-mapping-bug.ll +++ b/test/LTO/X86/type-mapping-bug.ll @@ -30,7 +30,7 @@ target triple = "x86_64-pc-windows-msvc18.0.0" !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!14} -!0 = !DIGlobalVariableExpression(var: !1) +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) !1 = !DIGlobalVariable(name: "foo", linkageName: "foo", scope: !2, file: !3, line: 5, type: !6, isLocal: false, isDefinition: true) !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) !3 = !DIFile(filename: "a", directory: "/") |