diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-11 22:25:00 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-11 22:25:00 +0000 |
commit | 8a9f3fd8bb14a64a31a29bf5cf5376b643218b71 (patch) | |
tree | d384738b6222dfc4fbf64beebd6cbabc7826a73f /lib/CodeGen/CGCall.cpp | |
parent | bac7c250c9b098ee3d637c8ed77da62e860d9244 (diff) |
Set the calling convention based on the CGFunctionInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81582 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 399624d2cf..fcaa49e129 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -851,9 +851,9 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, } CS.setAttributes(Attrs); - if (const llvm::Function *F = - dyn_cast<llvm::Function>(Callee->stripPointerCasts())) - CS.setCallingConv(F->getCallingConv()); + llvm::CallingConv::ID CC = + static_cast<llvm::CallingConv::ID>(CallInfo.getCallingConvention()); + CS.setCallingConv(CC); // If the call doesn't return, finish the basic block and clear the // insertion point; this allows the rest of IRgen to discard |