[all-commits] [llvm/llvm-project] f9bd89: MCFixup: Add isRelocation/isRelocRelocation helpers

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Apr 18 18:18:54 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9bd89b7ac35920241740969b2b83c45a6a6ddb3
      https://github.com/llvm/llvm-project/commit/f9bd89b7ac35920241740969b2b83c45a6a6ddb3
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-04-18 (Fri, 18 Apr 2025)

  Changed paths:
    M llvm/include/llvm/MC/MCAsmBackend.h
    M llvm/include/llvm/MC/MCFixup.h
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
    M llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
    M llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
    M llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
    M llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp
    M llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
    M llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
    M llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp

  Log Message:
  -----------
  MCFixup: Add isRelocation/isRelocRelocation helpers

Add two helper functions to simplify checks for relocation types,
replacing direct comparisons with FirstRelocationKind and
FirstLiteralRelocationKind. Note: Some targets haven't utilized
isRelocation yet.

Also, update RelaxFixupKind to use 0 as the sentinel value.



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