forked from OSchip/llvm-project
SampleProfileLoader::inlineHotFunctionsWithPriority - Fix uninitialized variable warning. NFCI.
findIndirectCallFunctionSamples will leave Sum uninitialized if it returns an empty vector, we don't really use Sum in this case (but we do make a copy that isn't used either) - so ensure we initialize the value to zero to at least silence the static analysis warning.
This commit is contained in:
parent
c5fe383990
commit
e30540a603
|
@ -1345,7 +1345,7 @@ bool SampleProfileLoader::inlineHotFunctionsWithPriority(
|
|||
if (CalledFunction == &F)
|
||||
continue;
|
||||
if (I->isIndirectCall()) {
|
||||
uint64_t Sum;
|
||||
uint64_t Sum = 0;
|
||||
auto CalleeSamples = findIndirectCallFunctionSamples(*I, Sum);
|
||||
uint64_t SumOrigin = Sum;
|
||||
Sum *= Candidate.CallsiteDistribution;
|
||||
|
|
Loading…
Reference in New Issue