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 | cdeb81d41273220bb35171fe9eeee44f46d8d8b1 (patch) | |
tree | cae1c30554beb6d210a5de0b28b6f8f7a7bd4e50 /lib/Transforms/LevelRaise.cpp | |
parent | 8d248c51e9f4614e1e5e4fe84dfda88899362599 (diff) |
Fix bug: LevelRaise/2003-05-01-CallCast.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/LevelRaise.cpp')
-rw-r--r-- | lib/Transforms/LevelRaise.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index 2e9d8c2f8c..b2c6b05ab4 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/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... // |