mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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:
parent
8d248c51e9
commit
cdeb81d412
@ -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
Block a user