diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-05-16 00:41:29 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-05-16 00:41:29 +0000 |
| commit | 59f0a5a5481a6dcfafd092dd944e6cfb7d146d4c (patch) | |
| tree | f0596a05f125663532061a6d532a5d6c02c8d75e /lib/CodeGen/CGException.cpp | |
| parent | 1c3db769249a633108dc320da87c48a432e2bcc1 (diff) | |
| download | clang-59f0a5a5481a6dcfafd092dd944e6cfb7d146d4c.tar.gz clang-59f0a5a5481a6dcfafd092dd944e6cfb7d146d4c.tar.bz2 clang-59f0a5a5481a6dcfafd092dd944e6cfb7d146d4c.tar.xz | |
Set the debug location for landing pad code to the canonical EH location.
It used to point to the first call that caused the landing pad to
be generated.
rdar://problem/13888152
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGException.cpp')
| -rw-r--r-- | lib/CodeGen/CGException.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index a088d78641..4b09e97344 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -766,6 +766,11 @@ llvm::BasicBlock *CodeGenFunction::EmitLandingPad() { // Save the current IR generation state. CGBuilderTy::InsertPoint savedIP = Builder.saveAndClearIP(); + SourceLocation SavedLocation; + if (CGDebugInfo *DI = getDebugInfo()) { + SavedLocation = DI->getLocation(); + DI->EmitLocation(Builder, CurEHLocation); + } const EHPersonality &personality = EHPersonality::get(getLangOpts()); @@ -887,6 +892,8 @@ llvm::BasicBlock *CodeGenFunction::EmitLandingPad() { // Restore the old IR generation state. Builder.restoreIP(savedIP); + if (CGDebugInfo *DI = getDebugInfo()) + DI->EmitLocation(Builder, SavedLocation); return lpad; } |
