[llvm] 95202ab - MC: Remove unused MCFixupKindInfo::FKF_Constant

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon May 19 21:17:41 PDT 2025


Author: Fangrui Song
Date: 2025-05-19T21:17:37-07:00
New Revision: 95202ab54ec85898aba46020a18449f46890800c

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

LOG: MC: Remove unused MCFixupKindInfo::FKF_Constant

This was an ARM workaround, which has been removed by #76574

Added: 
    

Modified: 
    llvm/include/llvm/MC/MCFixupKindInfo.h
    llvm/lib/MC/MCAssembler.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/MC/MCFixupKindInfo.h b/llvm/include/llvm/MC/MCFixupKindInfo.h
index 4fae148f38628..f11cd5caa1d8c 100644
--- a/llvm/include/llvm/MC/MCFixupKindInfo.h
+++ b/llvm/include/llvm/MC/MCFixupKindInfo.h
@@ -25,11 +25,6 @@ struct MCFixupKindInfo {
 
     /// Should this fixup be evaluated in a target dependent manner?
     FKF_IsTarget = (1 << 2),
-
-    /// This fixup kind should be resolved if defined.
-    /// FIXME This is a workaround because we don't support certain ARM
-    /// relocation types. This flag should eventually be removed.
-    FKF_Constant = 1 << 3,
   };
 
   /// A target specific name for the fixup kind. The names will be unique for

diff  --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index f8e7204dd797b..3a974f3591631 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -184,9 +184,8 @@ bool MCAssembler::evaluateFixup(const MCFixup &Fixup, const MCFragment *DF,
       Value -= Offset;
 
       if (Add && !Sub && !Add->isUndefined() && !Add->isAbsolute()) {
-        IsResolved = (FixupFlags & MCFixupKindInfo::FKF_Constant) ||
-                     getWriter().isSymbolRefDifferenceFullyResolvedImpl(
-                         *this, *Add, *DF, false, true);
+        IsResolved = getWriter().isSymbolRefDifferenceFullyResolvedImpl(
+            *this, *Add, *DF, false, true);
       }
     } else {
       IsResolved = Target.isAbsolute();


        


More information about the llvm-commits mailing list