From 82f149d794dcb705a05e9e260402cbf3f36f1957 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 4 Sep 2009 01:14:14 +0000 Subject: [PATCH] If there's a calling convention attach it to the rewind function call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80976 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/DwarfEHPrepare.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/DwarfEHPrepare.cpp b/lib/CodeGen/DwarfEHPrepare.cpp index 16581112b66..a2e6068ff87 100644 --- a/lib/CodeGen/DwarfEHPrepare.cpp +++ b/lib/CodeGen/DwarfEHPrepare.cpp @@ -240,7 +240,9 @@ bool DwarfEHPrepare::LowerUnwinds() { } // Create the call... - CallInst::Create(RewindFunction, CreateReadOfExceptionValue(I), "", TI); + CallInst *CI = CallInst::Create(RewindFunction, + CreateReadOfExceptionValue(I), "", TI); + CI->setCallingConv(TLI->getLibcallCallingConv(RTLIB::UNWIND_RESUME)); // ...followed by an UnreachableInst. new UnreachableInst(TI->getContext(), TI); -- 2.34.1