[all-commits] [llvm/llvm-project] 0196d7: [MC][DecoderEmitter] Fix build warning: explicit s...

Rahul Joshi via All-commits all-commits at lists.llvm.org
Tue Sep 2 07:28:58 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0196d7ec6988c39fa08ba296d28ffb00494f2834
      https://github.com/llvm/llvm-project/commit/0196d7ec6988c39fa08ba296d28ffb00494f2834
  Author: Rahul Joshi <rjoshi at nvidia.com>
  Date:   2025-09-02 (Tue, 02 Sep 2025)

  Changed paths:
    M llvm/include/llvm/MC/MCDecoder.h
    M llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
    M llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
    M llvm/utils/TableGen/DecoderEmitter.cpp

  Log Message:
  -----------
  [MC][DecoderEmitter] Fix build warning: explicit specialization cannot have a storage class (#156375)

Move `InsnBitWidth` template into anonymous namespace in the generated
code and move template specialization of `InsnBitWidth` to anonymous
namespace as well, and drop `static` for them. This makes `InsnBitWidth`
completely private to each target and fixes the "explicit specialization
cannot have a storage class" warning as well as any potential linker
errors if `InsnBitWidth` is kept in the `llvm::MCD` namespace.



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