If there's a calling convention attach it to the rewind function call.
authorEric Christopher <echristo@apple.com>
Fri, 4 Sep 2009 01:14:14 +0000 (01:14 +0000)
committerEric Christopher <echristo@apple.com>
Fri, 4 Sep 2009 01:14:14 +0000 (01:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80976 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DwarfEHPrepare.cpp

index 16581112b66e836223a4721b92afdad7849433ac..a2e6068ff87d41e1b58b89092a7e1922481f4218 100644 (file)
@@ -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);