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
This commit is contained in:
Chris Lattner 2003-05-01 21:02:53 +00:00
parent 8d248c51e9
commit cdeb81d412

View File

@ -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...
//