[all-commits] [llvm/llvm-project] 886dd1: [RISCV] Use const reference when looping over Exts...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Jan 27 09:24:42 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 886dd1179572e62c8f83f4cdb61044b232ccda4b
      https://github.com/llvm/llvm-project/commit/886dd1179572e62c8f83f4cdb61044b232ccda4b
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-01-27 (Thu, 27 Jan 2022)

  Changed paths:
    M llvm/lib/Support/RISCVISAInfo.cpp

  Log Message:
  -----------
  [RISCV] Use const reference when looping over Exts in RISCVISAInfo.

Exts is a map of keyed by std::string with a extension info as
a value. Making copies of this wouldn't be cheap.

We had a mix of references and copies. This makes everything
consistently use a const reference to make it clear we aren't
modifying it.

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




More information about the All-commits mailing list