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/Bitcode | |
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/Bitcode')
-rw-r--r-- | test/Bitcode/DIGlobalVariableExpression.ll | 2 | ||||
-rw-r--r-- | test/Bitcode/DIGlobalVariableExpression2.ll | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/Bitcode/DIGlobalVariableExpression.ll b/test/Bitcode/DIGlobalVariableExpression.ll index d6ff13907170..b757fa599c9f 100644 --- a/test/Bitcode/DIGlobalVariableExpression.ll +++ b/test/Bitcode/DIGlobalVariableExpression.ll @@ -13,7 +13,7 @@ ; CHECK: ![[HVAR:[0-9]+]] = distinct !DIGlobalVariable(name: "h", ; CHECK: ![[IMPORTS]] = !{![[CIMPORT:[0-9]+]]} ; CHECK: ![[CIMPORT]] = !DIImportedEntity({{.*}}entity: ![[HVAR]] -; CHECK: ![[H]] = {{.*}}!DIGlobalVariableExpression(var: ![[HVAR]]) +; CHECK: ![[H]] = {{.*}}!DIGlobalVariableExpression(var: ![[HVAR]], expr: !DIExpression()) @g = common global i32 0, align 4, !dbg !0 @h = common global i32 0, align 4, !dbg !11 diff --git a/test/Bitcode/DIGlobalVariableExpression2.ll b/test/Bitcode/DIGlobalVariableExpression2.ll index 55974d5317dd..3de1f7ffd3d5 100644 --- a/test/Bitcode/DIGlobalVariableExpression2.ll +++ b/test/Bitcode/DIGlobalVariableExpression2.ll @@ -1,10 +1,10 @@ ; RUN: llvm-dis -o - %s.bc | FileCheck %s ; CHECK: @g = common global i32 0, align 4, !dbg ![[G:[0-9]+]] -; CHECK-DAG: ![[G]] = distinct !DIGlobalVariableExpression(var: ![[GVAR:[0-9]+]]) +; CHECK-DAG: ![[G]] = distinct !DIGlobalVariableExpression(var: ![[GVAR:[0-9]+]], expr: !DIExpression()) ; CHECK-DAG: distinct !DICompileUnit({{.*}}, globals: ![[GLOBS:[0-9]+]] ; CHECK-DAG: ![[GLOBS]] = !{![[GEXPR:[0-9]+]]} -; CHECK-DAG: ![[GEXPR]] = distinct !DIGlobalVariableExpression(var: ![[GVAR]]) +; CHECK-DAG: ![[GEXPR]] = distinct !DIGlobalVariableExpression(var: ![[GVAR]], expr: !DIExpression()) ; CHECK-DAG: ![[GVAR]] = !DIGlobalVariable(name: "g", ; Test the bitcode upgrade for DIGlobalVariable -> DIGlobalVariableExpression. |