diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2018-08-10 12:53:13 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2018-08-10 12:53:13 +0000 |
commit | 93ce018f3d1a84a463e5a2c4b0d2a445c91e933d (patch) | |
tree | 97f7ab98f3b7a2331262d63109166af35a2c2ba0 /clang/lib/CodeGen/CGException.cpp | |
parent | bebcd6fa4d2cbac48401bb95befb58dc81f6e54e (diff) | |
download | llvm-93ce018f3d1a84a463e5a2c4b0d2a445c91e933d.zip llvm-93ce018f3d1a84a463e5a2c4b0d2a445c91e933d.tar.gz llvm-93ce018f3d1a84a463e5a2c4b0d2a445c91e933d.tar.bz2 |
Add Windows support for the GNUstep Objective-C ABI V2.
Summary:
Introduces funclet-based unwinding for Objective-C and fixes an issue
where global blocks can't have their isa pointers initialised on
Windows.
After discussion with Dustin, this changes the name mangling of
Objective-C types to prevent a C++ catch statement of type struct X*
from catching an Objective-C object of type X*.
Reviewers: rjmccall, DHowett-MSFT
Reviewed By: rjmccall, DHowett-MSFT
Subscribers: mgrang, mstorsjo, smeenai, cfe-commits
Differential Revision: https://reviews.llvm.org/D50144
llvm-svn: 339428
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index def930a..4ee8352 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -1829,7 +1829,7 @@ void CodeGenFunction::startOutlinedSEHHelper(CodeGenFunction &ParentCGF, SmallString<128> Name; { llvm::raw_svector_ostream OS(Name); - const FunctionDecl *ParentSEHFn = ParentCGF.CurSEHParent; + const NamedDecl *ParentSEHFn = ParentCGF.CurSEHParent; assert(ParentSEHFn && "No CurSEHParent!"); MangleContext &Mangler = CGM.getCXXABI().getMangleContext(); if (IsFilter) @@ -1972,6 +1972,11 @@ llvm::Value *CodeGenFunction::EmitSEHAbnormalTermination() { return Builder.CreateZExt(&*AI, Int32Ty); } +void CodeGenFunction::pushSEHCleanup(CleanupKind Kind, + llvm::Function *FinallyFunc) { + EHStack.pushCleanup<PerformSEHFinally>(Kind, FinallyFunc); +} + void CodeGenFunction::EnterSEHTryStmt(const SEHTryStmt &S) { CodeGenFunction HelperCGF(CGM, /*suppressNewContext=*/true); if (const SEHFinallyStmt *Finally = S.getFinallyHandler()) { |