[llvm-branch-commits] [llvm-gcc-branch] r79717 - /llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Fri Aug 21 19:33:22 PDT 2009
Author: void
Date: Fri Aug 21 21:33:21 2009
New Revision: 79717
URL: http://llvm.org/viewvc/llvm-project?rev=79717&view=rev
Log:
$ svn merge -c 79706 https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
--- Merging r79706 into '.':
U gcc/llvm-convert.cpp
Modified:
llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp?rev=79717&r1=79716&r2=79717&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp Fri Aug 21 21:33:21 2009
@@ -2159,7 +2159,21 @@
// Fetch and store exception handler.
Value *Arg = Builder.CreateLoad(ExceptionValue, "eh_ptr");
assert(llvm_unwind_resume_libfunc && "no unwind resume function!");
+
+ // As we're emitting a naked call (not an expression) going through
+ // EmitCallOf would be wasteful and incorrect. Manually adjust
+ // the calling convention for this call here if necessary.
+#ifdef TARGET_ADJUST_LLVM_CC
+ tree fntype = TREE_TYPE(llvm_unwind_resume_libfunc);
+ CallingConv::ID CallingConvention = CallingConv::C;
+
+ TARGET_ADJUST_LLVM_CC(CallingConvention, fntype);
+ CallInst *Call = Builder.CreateCall(DECL_LLVM(llvm_unwind_resume_libfunc),
+ Arg);
+ Call->setCallingConv(CallingConvention);
+#else
Builder.CreateCall(DECL_LLVM(llvm_unwind_resume_libfunc), Arg);
+#endif
Builder.CreateUnreachable();
}
}
More information about the llvm-branch-commits
mailing list