diff --git a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp index 7d8bc3aa4c589..c6352df39bba5 100644 --- a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp @@ -929,11 +929,11 @@ memprof::computeUndriftMap(Module &M, IndexedInstrProfReader *MemProfReader, longestCommonSequence( ProfileAnchors, IRAnchors, std::equal_to(), [&](LineLocation A, LineLocation B) { Matchings.try_emplace(A, B); }); - bool Inserted = UndriftMaps.try_emplace(CallerGUID, Matchings).second; + [[maybe_unused]] bool Inserted = + UndriftMaps.try_emplace(CallerGUID, std::move(Matchings)).second; // The insertion must succeed because we visit each GUID exactly once. assert(Inserted); - (void)Inserted; } return UndriftMaps;