Use a more idiomatic way to disable debug locations.

llvm-svn: 180931
This commit is contained in:
Adrian Prantl 2013-05-02 17:30:16 +00:00
parent e55f77aec8
commit f1b28a5dbc
1 changed files with 2 additions and 4 deletions

View File

@ -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;
}