Narrow Callee scope, suggestion from David Blaikie.

llvm-svn: 242644
This commit is contained in:
Yaron Keren 2015-07-19 15:48:07 +00:00
parent e2c244f3b4
commit c66c06b899
1 changed files with 3 additions and 3 deletions

View File

@ -469,9 +469,9 @@ bool Inliner::runOnSCC(CallGraphSCC &SCC) {
// If this is a direct call to an external function, we can never inline
// it. If it is an indirect call, inlining may resolve it to be a
// direct call, so we keep it.
Function *Callee = CS.getCalledFunction();
if (Callee && Callee->isDeclaration())
continue;
if (Function *Callee = CS.getCalledFunction())
if (Callee->isDeclaration())
continue;
CallSites.push_back(std::make_pair(CS, -1));
}