diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-01-17 00:15:10 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-01-17 00:15:10 +0000 |
commit | d1b151ed7cfafbaf87ed8e3dbec0929a0d174460 (patch) | |
tree | b76f56cb882d22d75041025e29aa0f74a8ee68bf /clang/lib/CodeGen/CGCleanup.cpp | |
parent | 3dd73db411177d9b9bb67e96309ed85a792d87c8 (diff) | |
download | bcm5719-llvm-d1b151ed7cfafbaf87ed8e3dbec0929a0d174460.tar.gz bcm5719-llvm-d1b151ed7cfafbaf87ed8e3dbec0929a0d174460.zip |
Debug info: Refactor NoLocation and ArtificialLocation to use a common base
class and use it pervasively to restore debug locations.
Fixes an interaction between cleanup and EH that caused the location
to not be restored properly after emitting a landing pad.
rdar://problem/15208190
llvm-svn: 199444
Diffstat (limited to 'clang/lib/CodeGen/CGCleanup.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCleanup.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.cpp b/clang/lib/CodeGen/CGCleanup.cpp index c4e7880196e..4983ce93437 100644 --- a/clang/lib/CodeGen/CGCleanup.cpp +++ b/clang/lib/CodeGen/CGCleanup.cpp @@ -860,7 +860,9 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) { // Emit the EH cleanup if required. if (RequiresEHCleanup) { - if (CGDebugInfo *DI = getDebugInfo()) + CGDebugInfo *DI = getDebugInfo(); + SaveAndRestoreLocation AutoRestoreLocation(*this, Builder); + if (DI) DI->EmitLocation(Builder, CurEHLocation); CGBuilderTy::InsertPoint SavedIP = Builder.saveAndClearIP(); |