[all-commits] [llvm/llvm-project] 108ba4: [llvm-readobj] Refactor ELFDumper::printAttributes()

jozeflopen via All-commits all-commits at lists.llvm.org
Tue Aug 17 13:28:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 108ba4f4a48043067f0735f7f7c6f301045cf9b5
      https://github.com/llvm/llvm-project/commit/108ba4f4a48043067f0735f7f7c6f301045cf9b5
  Author: Jozef Lawrynowicz <jozefl.opensrc at gmail.com>
  Date:   2021-08-17 (Tue, 17 Aug 2021)

  Changed paths:
    A llvm/test/tools/llvm-readobj/ELF/ARM/attribute-big-endian.test
    M llvm/test/tools/llvm-readobj/ELF/RISCV/validate-attr-section.test
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [llvm-readobj] Refactor ELFDumper::printAttributes()

The current implementation of printAttributes makes it fiddly to extend
attribute support for new targets.

By refactoring the code so all target specific variables are
initialized in a switch/case statement, it becomes simpler to extend
attribute support for new targets.

Reviewed By: jhenderson, MaskRay

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




More information about the All-commits mailing list