[all-commits] [llvm/llvm-project] ec353b: [memprof] Use llvm::function_ref instead of std::f...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Fri Nov 15 13:03:46 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec353b7418e272e96cd63cc61bec586ab49da92f
      https://github.com/llvm/llvm-project/commit/ec353b7418e272e96cd63cc61bec586ab49da92f
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M llvm/include/llvm/ProfileData/MemProf.h
    M llvm/lib/ProfileData/InstrProfReader.cpp

  Log Message:
  -----------
  [memprof] Use llvm::function_ref instead of std::function (#116306)

We've seen bugs where we lost track of error states stored in the
functor because we passed the functor by value (that is,
std::function) as opposed to reference (llvm::function_ref).

This patch fixes a couple of places we pass functors by value.

While we are at it, this patch adds curly braces around a "for" loop
spanning multiple lines.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list