r180931 - Use a more idiomatic way to disable debug locations.

Adrian Prantl aprantl at apple.com
Thu May 2 10:30:17 PDT 2013


Author: adrian
Date: Thu May  2 12:30:16 2013
New Revision: 180931

URL: http://llvm.org/viewvc/llvm-project?rev=180931&view=rev
Log:
Use a more idiomatic way to disable debug locations.

Modified:
    cfe/trunk/lib/CodeGen/CGBlocks.cpp

Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=180931&r1=180930&r2=180931&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Thu May  2 12:30:16 2013
@@ -1169,11 +1169,9 @@ CodeGenFunction::GenerateBlockFunction(G
     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;
   }
 





More information about the cfe-commits mailing list