mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 05:31:51 +00:00
Don't inline functions that take variable numbers of arguments!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6024 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1b27cb7159
commit
8d8f20e47a
@ -20,7 +20,7 @@
|
||||
#include "llvm/iTerminators.h"
|
||||
#include "llvm/iPHINode.h"
|
||||
#include "llvm/iOther.h"
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "Support/Statistic.h"
|
||||
#include <algorithm>
|
||||
|
||||
@ -42,8 +42,9 @@ bool InlineFunction(CallInst *CI) {
|
||||
assert(CI->getParent()->getParent() && "Instruction not in function!");
|
||||
|
||||
const Function *CalledFunc = CI->getCalledFunction();
|
||||
if (CalledFunc == 0 || // Can't inline external function or indirect call!
|
||||
CalledFunc->isExternal()) return false;
|
||||
if (CalledFunc == 0 || // Can't inline external function or indirect
|
||||
CalledFunc->isExternal() || // call, or call to a vararg function!
|
||||
CalledFunc->getFunctionType()->isVarArg()) return false;
|
||||
|
||||
//std::cerr << "Inlining " << CalledFunc->getName() << " into "
|
||||
// << CurrentMeth->getName() << "\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user