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 | 05782218abd549e0c1bc77032fa9b55526371cfd (patch) | |
| tree | 1cd1e0e5ace565ad80e6e9053bb7d858a38362b5 /llvm/test/Bitcode/DIGlobalVariableExpression2.ll | |
| parent | 1a4cbbe49fcaebe63246c784983556528bcb27d8 (diff) | |
| download | bcm5719-llvm-05782218abd549e0c1bc77032fa9b55526371cfd.tar.gz bcm5719-llvm-05782218abd549e0c1bc77032fa9b55526371cfd.zip | |
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%.
llvm-svn: 312144
Diffstat (limited to 'llvm/test/Bitcode/DIGlobalVariableExpression2.ll')
| -rw-r--r-- | llvm/test/Bitcode/DIGlobalVariableExpression2.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Bitcode/DIGlobalVariableExpression2.ll b/llvm/test/Bitcode/DIGlobalVariableExpression2.ll index 55974d5317d..3de1f7ffd3d 100644 --- a/llvm/test/Bitcode/DIGlobalVariableExpression2.ll +++ b/llvm/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. |

