From: Adrian Prantl Date: Thu, 2 May 2013 17:30:16 +0000 (+0000) Subject: Use a more idiomatic way to disable debug locations. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4147c4b2d4eba0327658f36c5a2c63f2d234991;p=clang Use a more idiomatic way to disable debug locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180931 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index f49198a9bf..dd0ef41750 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -1169,11 +1169,9 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, Alloca->setAlignment(Align); // Set the DebugLocation to empty, so the store is recognized as a // frame setup instruction by llvm::DwarfDebug::beginFunction(). - llvm::DebugLoc Empty; - llvm::DebugLoc Loc = Builder.getCurrentDebugLocation(); - Builder.SetCurrentDebugLocation(Empty); + Builder.DisableDebugLocations(); Builder.CreateAlignedStore(BlockPointer, Alloca, Align); - Builder.SetCurrentDebugLocation(Loc); + Builder.EnableDebugLocations(); BlockPointerDbgLoc = Alloca; }