[all-commits] [llvm/llvm-project] eff777: [nfc][ProfileData] Fix -Wrange-loop-construct in S...

Razvan Lupusoru via All-commits all-commits at lists.llvm.org
Wed Sep 9 13:05:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eff777582665d7c076824cec211fe20c6fb154e5
      https://github.com/llvm/llvm-project/commit/eff777582665d7c076824cec211fe20c6fb154e5
  Author: Razvan Lupusoru <razvan.lupusoru at gmail.com>
  Date:   2026-09-09 (Wed, 09 Sep 2026)

  Changed paths:
    M llvm/lib/ProfileData/SampleProfWriter.cpp

  Log Message:
  -----------
  [nfc][ProfileData] Fix -Wrange-loop-construct in SampleProfileWriter (#220726)

Fixes warnings:
```
SampleProfWriter.cpp:804:12: note: use reference type 'std::pair<llvm::sampleprof::FunctionId, unsigned long> const &' to prevent copying
  804 |       for (const auto [TypeName, Count] : *Map) {
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                       &
  SampleProfWriter.cpp:829:12: note: use reference type 'std::pair<llvm::sampleprof::FunctionId, unsigned long> const &' to prevent copying
  829 |       for (const auto [TypeId, Count] : *Map) {
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                       &
```



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