diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2021-05-07 13:23:53 -0700 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2021-05-07 13:27:59 -0700 |
commit | c4adc49a1c988e6ea8a340b6245525ef5599812c (patch) | |
tree | c22c0a1e059f7c2ba62c4f840373442a5c8fa0d5 /clang/lib/CodeGen/CGException.cpp | |
parent | 337d7652823f59f4613552cebdf81292bf8f393d (diff) | |
download | llvm-c4adc49a1c988e6ea8a340b6245525ef5599812c.zip llvm-c4adc49a1c988e6ea8a340b6245525ef5599812c.tar.gz llvm-c4adc49a1c988e6ea8a340b6245525ef5599812c.tar.bz2 |
[SEH] Fix regression with SEH in noexpect functions
Commit 5baea0560160a693b19022c5d0ba637b6b46b2d8 set the CurCodeDecl
because it was needed to pass the assert in CodeGenFunction::EmitLValueForLambdaField,
But this was not right to do as CodeGenFunction::FinishFunction passes it to EmitEndEHSpec
and cause corruption of the EHStack.
Revert the part of the commit that changes the CurCodeDecl, and instead
adjust the assert to check for a null CurCodeDecl.
Differential Revision: https://reviews.llvm.org/D102027
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 078c60c..aa6fe30 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -1966,7 +1966,6 @@ void CodeGenFunction::startOutlinedSEHHelper(CodeGenFunction &ParentCGF, StartFunction(GlobalDecl(), RetTy, Fn, FnInfo, Args, OutlinedStmt->getBeginLoc(), OutlinedStmt->getBeginLoc()); CurSEHParent = ParentCGF.CurSEHParent; - CurCodeDecl = ParentCGF.CurCodeDecl; CGM.SetInternalFunctionAttributes(GlobalDecl(), CurFn, FnInfo); EmitCapturedLocals(ParentCGF, OutlinedStmt, IsFilter); |