]> granicus.if.org Git - clang/commitdiff
Use a more idiomatic way to disable debug locations.
authorAdrian Prantl <aprantl@apple.com>
Thu, 2 May 2013 17:30:16 +0000 (17:30 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 2 May 2013 17:30:16 +0000 (17:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180931 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.cpp

index f49198a9bfb2c3ff2a9ba497eeacfb026bb26cf3..dd0ef41750d5c82aa093766ce47db440c51fb51a 100644 (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;
   }