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/Transforms/ConstantMerge/merge-dbg.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/Transforms/ConstantMerge/merge-dbg.ll')
| -rw-r--r-- | llvm/test/Transforms/ConstantMerge/merge-dbg.ll | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Transforms/ConstantMerge/merge-dbg.ll b/llvm/test/Transforms/ConstantMerge/merge-dbg.ll index bc33248514e..6ea680cfb34 100644 --- a/llvm/test/Transforms/ConstantMerge/merge-dbg.ll +++ b/llvm/test/Transforms/ConstantMerge/merge-dbg.ll @@ -13,12 +13,12 @@ define void @test1(i32** %P1, i32** %P2) { !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!7, !8} -; CHECK: [[A]] = !DIGlobalVariableExpression(var: [[VA:![0-9]+]]) +; CHECK: [[A]] = !DIGlobalVariableExpression(var: [[VA:![0-9]+]], expr: !DIExpression()) ; CHECK: [[VA]] = distinct !DIGlobalVariable(name: "y" -; CHECK: [[B]] = !DIGlobalVariableExpression(var: [[VB:![0-9]+]]) +; CHECK: [[B]] = !DIGlobalVariableExpression(var: [[VB:![0-9]+]], expr: !DIExpression()) ; CHECK: [[VB]] = distinct !DIGlobalVariable(name: "x" -!0 = !DIGlobalVariableExpression(var: !1) +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) !1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true) !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 5.0.0 (trunk 297227) (llvm/trunk 297234)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) !3 = !DIFile(filename: "1.cc", directory: "/build") @@ -28,5 +28,5 @@ define void @test1(i32** %P1, i32** %P2) { !7 = !{i32 2, !"Dwarf Version", i32 4} !8 = !{i32 2, !"Debug Info Version", i32 3} -!9 = !DIGlobalVariableExpression(var: !10) +!9 = !DIGlobalVariableExpression(var: !10, expr: !DIExpression()) !10 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true) |

