[all-commits] [llvm/llvm-project] ca8d02: [RISCV] Use a switch instead of a series of if-cla...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Oct 25 13:45:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ca8d02d78ade46fca1569741f8f8639eb54538c7
      https://github.com/llvm/llvm-project/commit/ca8d02d78ade46fca1569741f8f8639eb54538c7
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

  Log Message:
  -----------
  [RISCV] Use a switch instead of a series of if-clauses [nfc] (try 2)

This way the compiler can tell us about missing cases if we add a new value
to this enum.  Amusingly, the first time I landed this, I had indeed forgotten
a switch case, and the build bots were quite happy to remind me of such.




More information about the All-commits mailing list