aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index d702b856cd..374c824a20 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -1147,7 +1147,13 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD,
"block.addr");
unsigned Align = getContext().getDeclAlign(&selfDecl).getQuantity();
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.CreateAlignedStore(BlockPointer, Alloca, Align);
+ Builder.SetCurrentDebugLocation(Loc);
BlockPointerDbgLoc = Alloca;
}