summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-07-18 00:28:02 +0000
committerAdrian Prantl <aprantl@apple.com>2013-07-18 00:28:02 +0000
commit2e0637ff63213e1b6b81271ba2a8c94819b9ac0c (patch)
treed7dde49eb3d3dad0aa8cb7d6b2f6aca7e867ae92 /clang/lib/CodeGen/CGBlocks.cpp
parent02c0caa198a1981fcf31bb21e602703ff8875aed (diff)
downloadbcm5719-llvm-2e0637ff63213e1b6b81271ba2a8c94819b9ac0c.tar.gz
bcm5719-llvm-2e0637ff63213e1b6b81271ba2a8c94819b9ac0c.zip
Replace llvm::DIBuilder::DisableDebugLocations() with two RAII interfaces
inspired by CodegenFunction::LexicalScope. - NoLocation temporarily turns off debug locations altogether. This is useful for emitting instructions that should be counted towards the function prologue. - BuiltinLocation temporarily switches to an artificial debug location that has a valid scope, but no line information. This is useful when emitting compiler-generated helper functions that have no source location associated with them. llvm-svn: 186552
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index eb1afa69559..3d825d33332 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -1164,9 +1164,8 @@ 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().
- Builder.DisableDebugLocations();
+ NoLocation NL(*this, Builder);
Builder.CreateAlignedStore(BlockPointer, Alloca, Align);
- Builder.EnableDebugLocations();
BlockPointerDbgLoc = Alloca;
}
OpenPOWER on IntegriCloud