[all-commits] [llvm/llvm-project] f6e84a: [lld-macho][nfc] Avoid using std::map for Platform...

Jez Ng via All-commits all-commits at lists.llvm.org
Sun Jul 11 15:25:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f6e84a84f95eb505e0dabcb8a16fcf77738a3c97
      https://github.com/llvm/llvm-project/commit/f6e84a84f95eb505e0dabcb8a16fcf77738a3c97
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-07-11 (Sun, 11 Jul 2021)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/MachO/Driver.h
    M lld/MachO/InputFiles.cpp
    M lld/MachO/InputFiles.h
    M lld/MachO/Writer.cpp

  Log Message:
  -----------
  [lld-macho][nfc] Avoid using std::map for PlatformKinds

The mappings we were using had a small number of keys, so a vector is
probably better. This allows us to remove the last usage of std::map in
our codebase.

I also used `removeSimulator` to simplify the code a bit further.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D105786




More information about the All-commits mailing list