summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r--clang/lib/CodeGen/CGException.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index ff12a9ab829..d75b96874ca 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -1305,7 +1305,7 @@ struct PerformSEHFinally : EHScopeStack::Cleanup {
void Emit(CodeGenFunction &CGF, Flags F) override {
ASTContext &Context = CGF.getContext();
- QualType ArgTys[2] = {Context.BoolTy, Context.VoidPtrTy};
+ QualType ArgTys[2] = {Context.UnsignedCharTy, Context.VoidPtrTy};
FunctionProtoType::ExtProtoInfo EPI;
const auto *FTP = cast<FunctionType>(
Context.getFunctionType(Context.VoidTy, ArgTys, EPI));
@@ -1502,7 +1502,8 @@ CodeGenFunction::GenerateSEHFilterFunction(CodeGenFunction &ParentCGF,
CGM.getCXXABI().getMangleContext().mangleSEHFilterExpression(Parent, OS);
}
- startOutlinedSEHHelper(ParentCGF, Name, getContext().IntTy, Args, FilterExpr);
+ startOutlinedSEHHelper(ParentCGF, Name, getContext().LongTy, Args,
+ FilterExpr);
// Mark finally block calls as nounwind and noinline to make LLVM's job a
// little easier.
@@ -1514,7 +1515,7 @@ CodeGenFunction::GenerateSEHFilterFunction(CodeGenFunction &ParentCGF,
// Emit the original filter expression, convert to i32, and return.
llvm::Value *R = EmitScalarExpr(FilterExpr);
- R = Builder.CreateIntCast(R, CGM.IntTy,
+ R = Builder.CreateIntCast(R, ConvertType(getContext().LongTy),
FilterExpr->getType()->isSignedIntegerType());
Builder.CreateStore(R, ReturnValue);
@@ -1532,7 +1533,8 @@ CodeGenFunction::GenerateSEHFinallyFunction(CodeGenFunction &ParentCGF,
FunctionArgList Args;
Args.push_back(ImplicitParamDecl::Create(
getContext(), nullptr, StartLoc,
- &getContext().Idents.get("abnormal_termination"), getContext().BoolTy));
+ &getContext().Idents.get("abnormal_termination"),
+ getContext().UnsignedCharTy));
Args.push_back(ImplicitParamDecl::Create(
getContext(), nullptr, StartLoc,
&getContext().Idents.get("frame_pointer"), getContext().VoidPtrTy));
OpenPOWER on IntegriCloud