summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py
diff options
context:
space:
mode:
authorMikael Holmen <mikael.holmen@ericsson.com>2017-09-21 11:14:27 +0000
committerMikael Holmen <mikael.holmen@ericsson.com>2017-09-21 11:14:27 +0000
commit582e141007b7de9e5174e9e42fd19e9ae44689ed (patch)
tree27d49224265fc5b3373d678b45d0dcd118fd8f53 /lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py
parent4b13bfd96533b427372e3f24e50e243aaffddc94 (diff)
downloadbcm5719-llvm-582e141007b7de9e5174e9e42fd19e9ae44689ed.tar.gz
bcm5719-llvm-582e141007b7de9e5174e9e42fd19e9ae44689ed.zip
[SROA] Really remove associated dbg.declare when removing dead alloca
Summary: There already was code that tried to remove the dbg.declare, but that code was placed after we had called I->replaceAllUsesWith(UndefValue::get(I->getType())); on the alloca, so when we searched for the relevant dbg.declare, we couldn't find it. Now we do the search before we call RAUW so there is a chance to find it. An existing testcase needed update due to this. Two dbg.declare with undef were removed and then suddenly one of the two CHECKS failed. Before this patch we got call void @llvm.dbg.declare(metadata i24* undef, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15 call void @llvm.dbg.declare(metadata %struct.prog_src_register* undef, metadata !14, metadata !DIExpression()), !dbg !15 call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !15 call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15 and with it we get call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !15 call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15 However, the CHECKs in the testcase checked things in a silly order, so they only passed since they found things in the first dbg.declare. Now we changed the order of the checks and the test passes. Reviewers: rnk Reviewed By: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37900 llvm-svn: 313875
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud