From ab08a9adab8e7b4bcdd25b7b425e06128bb33b69 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 llvm-svn: 171493 --- clang/lib/CodeGen/CGBlocks.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib') diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 68958522d8f..54bcb88ce38 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/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