mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +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:
@@ -491,7 +491,8 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
|
|||||||
const FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
|
const FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
|
||||||
|
|
||||||
// Is the call to a vararg variable with no real parameters?
|
// 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
|
// If so, insert a new cast instruction, casting it to a function type
|
||||||
// that matches the current arguments...
|
// that matches the current arguments...
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user