mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-30 16:53:02 +00:00
Don't inline functions that take variable numbers of arguments!
llvm-svn: 6024
This commit is contained in:
parent
d381dc9316
commit
f1f55e385c
@ -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