@@ -4616,14 +4616,15 @@ void ModuleBitcodeWriterBase::writePerModuleGlobalValueSummary() {
46164616 auto *Summary = VI.getSummaryList ()[0 ].get ();
46174617 FunctionSummary *FS = cast<FunctionSummary>(Summary);
46184618 collectMemProfCallStacks (
4619- FS, /* GetStackIndex*/ [& ](unsigned I) { return I; }, CallStacks);
4619+ FS, /* GetStackIndex*/ [](unsigned I) { return I; }, CallStacks);
46204620 }
46214621 // Finalize the radix tree, write it out, and get the map of positions in the
46224622 // linearized tree array.
46234623 DenseMap<CallStackId, LinearCallStackId> CallStackPos;
4624- if (!CallStacks.empty ())
4624+ if (!CallStacks.empty ()) {
46254625 CallStackPos =
46264626 writeMemoryProfileRadixTree (std::move (CallStacks), Stream, RadixAbbrev);
4627+ }
46274628
46284629 // Keep track of the current index into the CallStackPos map.
46294630 CallStackId CallStackCount = 0 ;
@@ -4862,9 +4863,10 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {
48624863 // Finalize the radix tree, write it out, and get the map of positions in the
48634864 // linearized tree array.
48644865 DenseMap<CallStackId, LinearCallStackId> CallStackPos;
4865- if (!CallStacks.empty ())
4866+ if (!CallStacks.empty ()) {
48664867 CallStackPos =
48674868 writeMemoryProfileRadixTree (std::move (CallStacks), Stream, RadixAbbrev);
4869+ }
48684870
48694871 // Keep track of the current index into the CallStackPos map.
48704872 CallStackId CallStackCount = 0 ;
0 commit comments