forked from OSchip/llvm-project
Check the number of Args in LibCallsShrinkWrap.
Some library fucntions can have no argument. llvm-svn: 284989
This commit is contained in:
parent
f51bf96977
commit
b05bac940d
|
@ -317,6 +317,8 @@ void LibCallsShrinkWrap::checkCandidate(CallInst &CI) {
|
|||
if (!TLI.getLibFunc(*Callee, Func) || !TLI.has(Func))
|
||||
return;
|
||||
|
||||
if (CI.getNumArgOperands() == 0)
|
||||
return;
|
||||
// TODO: Handle long double in other formats.
|
||||
Type *ArgType = CI.getArgOperand(0)->getType();
|
||||
if (!(ArgType->isFloatTy() || ArgType->isDoubleTy() ||
|
||||
|
|
Loading…
Reference in New Issue