summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-03-01 19:42:53 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-03-01 19:42:53 +0000
commit25eb165f18a6479bcae7bcb338b22a2bfc4290fd (patch)
tree56d7d9e2e2d369bf0e15d1b80859a60dff5959af /clang/lib/CodeGen/CodeGenFunction.cpp
parentd2da0f0cace6ae715c2eb4e1053d1cc20665ae62 (diff)
downloadbcm5719-llvm-25eb165f18a6479bcae7bcb338b22a2bfc4290fd.tar.gz
bcm5719-llvm-25eb165f18a6479bcae7bcb338b22a2bfc4290fd.zip
[MSVC Compat] Correctly handle finallys nested within finallys
We'd lose track of the parent CodeGenFunction, leading us to get confused with regard to which function a nested finally belonged to. Differential Revision: http://reviews.llvm.org/D17752 llvm-svn: 262379
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 8e327c2bc4e..0e118b8f6f7 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -669,6 +669,9 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
DidCallStackSave = false;
CurCodeDecl = D;
+ if (const auto *FD = dyn_cast_or_null<FunctionDecl>(D))
+ if (FD->usesSEHTry())
+ CurSEHParent = FD;
CurFuncDecl = (D ? D->getNonClosureContext() : nullptr);
FnRetTy = RetTy;
CurFn = Fn;
OpenPOWER on IntegriCloud