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 f49198a..dd0ef41 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -1169,11 +1169,9 @@
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;
}