From 3c7a0e1a75ebe13366a646a9eb8c4aa61e4728d3 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Fri, 4 Jan 2013 18:51:35 +0000 Subject: Debug Info: fix the line location for cleanup code of a block function The line information was changed when emitting debug information for all the DeclRefExprs and we should change it back to get ready for PopClenupBlocks called from FinishFunction. rdar://11562117 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171493 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGBlocks.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/CodeGen/CGBlocks.cpp') diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 68958522d8..54bcb88ce3 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -1176,6 +1176,9 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, Builder, blockInfo); } } + // Recover location if it was changed in the above loop. + DI->EmitLocation(Builder, + cast(blockDecl->getBody())->getRBracLoc()); } // And resume where we left off. -- cgit v1.2.3-70-g09d2