[all-commits] [llvm/llvm-project] f3867f: [llvm] Use *Map::try_emplace (NFC) (#143321)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Sun Jun 8 16:19:08 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3867f900fcb834bdc77c724766553d18aed0598
      https://github.com/llvm/llvm-project/commit/f3867f900fcb834bdc77c724766553d18aed0598
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-06-08 (Sun, 08 Jun 2025)

  Changed paths:
    M llvm/lib/Transforms/ObjCARC/BlotMapVector.h
    M llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp

  Log Message:
  -----------
  [llvm] Use *Map::try_emplace (NFC) (#143321)

- try_emplace(Key) is shorter than insert(std::make_pair(Key, 0)).
- try_emplace performs value initialization without value parameters.
- We overwrite values on successful insertion anyway.



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