[llvm] a438b23 - AArch64ELFObjectWriter: Remove MCContext argument

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat May 24 21:14:14 PDT 2025


Author: Fangrui Song
Date: 2025-05-24T21:14:09-07:00
New Revision: a438b23b8453457feddb8f4013ed5d381cfb8eef

URL: https://github.com/llvm/llvm-project/commit/a438b23b8453457feddb8f4013ed5d381cfb8eef
DIFF: https://github.com/llvm/llvm-project/commit/a438b23b8453457feddb8f4013ed5d381cfb8eef.diff

LOG: AArch64ELFObjectWriter: Remove MCContext argument

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
index a3b7c530c3909..32d2363a8604b 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
@@ -40,8 +40,8 @@ class AArch64ELFObjectWriter : public MCELFObjectTargetWriter {
                         const MCFixup &Fixup, bool IsPCRel) const override;
   bool needsRelocateWithSymbol(const MCValue &Val, const MCSymbol &Sym,
                                unsigned Type) const override;
-  bool isNonILP32reloc(const MCFixup &Fixup, AArch64MCExpr::Specifier RefKind,
-                       MCContext &Ctx) const;
+  bool isNonILP32reloc(const MCFixup &Fixup,
+                       AArch64MCExpr::Specifier RefKind) const;
 
   bool IsILP32;
 };
@@ -57,9 +57,8 @@ AArch64ELFObjectWriter::AArch64ELFObjectWriter(uint8_t OSABI, bool IsILP32)
   IsILP32 ? ELF::R_AARCH64_P32_##rtype : ELF::R_AARCH64_##rtype
 
 // assumes IsILP32 is true
-bool AArch64ELFObjectWriter::isNonILP32reloc(const MCFixup &Fixup,
-                                             AArch64MCExpr::Specifier RefKind,
-                                             MCContext &Ctx) const {
+bool AArch64ELFObjectWriter::isNonILP32reloc(
+    const MCFixup &Fixup, AArch64MCExpr::Specifier RefKind) const {
   if (Fixup.getTargetKind() != AArch64::fixup_aarch64_movw)
     return false;
   switch (RefKind) {
@@ -216,7 +215,7 @@ unsigned AArch64ELFObjectWriter::getRelocType(MCContext &Ctx,
       return ELF::R_AARCH64_NONE;
     }
   } else {
-    if (IsILP32 && isNonILP32reloc(Fixup, RefKind, Ctx))
+    if (IsILP32 && isNonILP32reloc(Fixup, RefKind))
       return ELF::R_AARCH64_NONE;
     switch (Fixup.getTargetKind()) {
     case FK_Data_1:


        


More information about the llvm-commits mailing list