diff options
| author | Torok Edwin <edwintorok@gmail.com> | 2009-05-22 07:25:06 +0000 |
|---|---|---|
| committer | Torok Edwin <edwintorok@gmail.com> | 2009-05-22 07:25:06 +0000 |
| commit | 5b34933b904f5483f46285fd79b22dc8678196be (patch) | |
| tree | f62ff3c92c8dde69e6c63283837c8f951975f0fa /clang/lib/CodeGen | |
| parent | 88e06db1160672d7152a2bd9db7fcf7977f6bbbd (diff) | |
| download | bcm5719-llvm-5b34933b904f5483f46285fd79b22dc8678196be.tar.gz bcm5719-llvm-5b34933b904f5483f46285fd79b22dc8678196be.zip | |
Set correct calling convention even if there is a bitcast in the way.
This attempts to fix PR4239.
llvm-svn: 72251
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 718a51512a2..356caa3f90e 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2100,7 +2100,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, } CS.setAttributes(Attrs); - if (const llvm::Function *F = dyn_cast<llvm::Function>(Callee)) + if (const llvm::Function *F = dyn_cast<llvm::Function>(Callee->stripPointerCasts())) CS.setCallingConv(F->getCallingConv()); // If the call doesn't return, finish the basic block and clear the |

