[all-commits] [llvm/llvm-project] 34c011: [llvm] Use *Map::try_emplace (NFC) (#143002)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Thu Jun 5 16:14:54 PDT 2025


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

  Changed paths:
    M llvm/include/llvm/ADT/MapVector.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/MC/StringTableBuilder.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp

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

- 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