author | Eric Christopher <echristo@gmail.com> | |
Thu, 3 Apr 2014 12:11:51 +0000 (12:11 +0000) | ||
committer | Eric Christopher <echristo@gmail.com> | |
Thu, 3 Apr 2014 12:11:51 +0000 (12:11 +0000) | ||
commit | 0b6dffa018f30c8f2f274c5071747cf786191831 | |
tree | 548ec1d27c01dce02c15bde61b9d9d5e76476244 | tree | snapshot (tar.xz tar.gz zip) |
parent | 60f5dfea66f8ad2a3fffe559567ff8dd7c382898 | commit | diff |
Fix for PR 19261:
llc doesn't generate nodes for unconditional fall-through branches for targets
without FastISel implementation (X86 has it, but can be disabled by
"-fast-isel=false") in SelectionDAGBuilder::visitBr().
So for line 4 in the following testcase
1: void foo(int i){
2: switch(i){
3: default:
4: break;
5: }
6: return;
7: }
there is no corresponding line in .debug_line section, and a debugger
cannot set a breakpoint at line 4.
Fix this by always emitting a branch when we're not optimizing and add a
testcase to ensure that there's code on every line we'd want to break.
Patch by Daniil Fukalov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205529 91177308-0d34-0410-b5e6-96231b3b80d8
llc doesn't generate nodes for unconditional fall-through branches for targets
without FastISel implementation (X86 has it, but can be disabled by
"-fast-isel=false") in SelectionDAGBuilder::visitBr().
So for line 4 in the following testcase
1: void foo(int i){
2: switch(i){
3: default:
4: break;
5: }
6: return;
7: }
there is no corresponding line in .debug_line section, and a debugger
cannot set a breakpoint at line 4.
Fix this by always emitting a branch when we're not optimizing and add a
testcase to ensure that there's code on every line we'd want to break.
Patch by Daniil Fukalov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205529 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | diff | blob | history | |
test/DebugInfo/unconditional-branch.ll | [new file with mode: 0644] | blob |