diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-05-01 21:02:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-05-01 21:02:53 +0000 |
| commit | 802c63d964b1e962d96792fe5bfa3b4120d19cda (patch) | |
| tree | d504c2b4dcdfbcbb12f796167792508190dda2e9 /llvm/lib/Transforms/LevelRaise.cpp | |
| parent | a0cde203aec2e8d43ba1e9801693c097bd05e0d7 (diff) | |
| download | bcm5719-llvm-802c63d964b1e962d96792fe5bfa3b4120d19cda.tar.gz bcm5719-llvm-802c63d964b1e962d96792fe5bfa3b4120d19cda.zip | |
Fix bug: LevelRaise/2003-05-01-CallCast.ll
llvm-svn: 5975
Diffstat (limited to 'llvm/lib/Transforms/LevelRaise.cpp')
| -rw-r--r-- | llvm/lib/Transforms/LevelRaise.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/LevelRaise.cpp b/llvm/lib/Transforms/LevelRaise.cpp index 2e9d8c2f8c8..b2c6b05ab46 100644 --- a/llvm/lib/Transforms/LevelRaise.cpp +++ b/llvm/lib/Transforms/LevelRaise.cpp @@ -491,7 +491,8 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) { const FunctionType *FTy = cast<FunctionType>(PTy->getElementType()); // Is the call to a vararg variable with no real parameters? - if (FTy->isVarArg() && FTy->getNumParams() == 0) { + if (FTy->isVarArg() && FTy->getNumParams() == 0 && + !CI->getCalledFunction()) { // If so, insert a new cast instruction, casting it to a function type // that matches the current arguments... // |

