forked from OSchip/llvm-project
Fix bug: LevelRaise/2003-05-01-CallCast.ll
llvm-svn: 5975
This commit is contained in:
parent
a0cde203ae
commit
802c63d964
|
@ -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...
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue