forked from OSchip/llvm-project
[StaticAnalyzer] Move inline counter increaser to inlineCall function
Even though the shouldInlineCall function returns true, it can happen that the function is not going to be inlined (as it can be seen at line 913 and below). Moved the bumpNumTimesInlined(D) (the counter increaser) call to the inlineCall function where it logically belongs. Differential Revision: https://reviews.llvm.org/D32179 llvm-svn: 303158
This commit is contained in:
parent
be6ef0eff9
commit
32134db1a1
|
@ -447,6 +447,7 @@ bool ExprEngine::inlineCall(const CallEvent &Call, const Decl *D,
|
|||
Bldr.takeNodes(Pred);
|
||||
|
||||
NumInlinedCalls++;
|
||||
Engine.FunctionSummaries->bumpNumTimesInlined(D);
|
||||
|
||||
// Mark the decl as visited.
|
||||
if (VisitedCallees)
|
||||
|
@ -868,8 +869,6 @@ bool ExprEngine::shouldInlineCall(const CallEvent &Call, const Decl *D,
|
|||
|| IsRecursive))
|
||||
return false;
|
||||
|
||||
Engine.FunctionSummaries->bumpNumTimesInlined(D);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue