diff options
author | Eric Christopher <echristo@apple.com> | 2011-09-09 21:53:04 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-09-09 21:53:04 +0000 |
commit | 65c5c9132f700a79619aa2bc339acc8896a8b48b (patch) | |
tree | 945fcdbd1ad1333fdb166f8c24a909c216ef5bc2 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 29cfe6c3683f2a80e28e3735bfb3955504d3cdd9 (diff) | |
download | bcm5719-llvm-65c5c9132f700a79619aa2bc339acc8896a8b48b.tar.gz bcm5719-llvm-65c5c9132f700a79619aa2bc339acc8896a8b48b.zip |
Carry the debug information from single exit unified return block
along with the new insert point.
Fixes PR10829
llvm-svn: 139416
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 7e8415bb268..a16f10e6541 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -116,7 +116,8 @@ void CodeGenFunction::EmitReturnBlock() { dyn_cast<llvm::BranchInst>(*ReturnBlock.getBlock()->use_begin()); if (BI && BI->isUnconditional() && BI->getSuccessor(0) == ReturnBlock.getBlock()) { - // Reset insertion point and delete the branch. + // Reset insertion point, including debug location, and delete the branch. + Builder.SetCurrentDebugLocation(BI->getDebugLoc()); Builder.SetInsertPoint(BI->getParent()); BI->eraseFromParent(); delete ReturnBlock.getBlock(); |