[llvm] 7207300 - [MC] Remove empty fixELFSymbolsInTLSFixups overrides
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 15 00:24:06 PDT 2025
Author: Fangrui Song
Date: 2025-03-15T00:24:00-07:00
New Revision: 720730041deeb522177efe2e8c1d18c260edeb02
URL: https://github.com/llvm/llvm-project/commit/720730041deeb522177efe2e8c1d18c260edeb02
DIFF: https://github.com/llvm/llvm-project/commit/720730041deeb522177efe2e8c1d18c260edeb02.diff
LOG: [MC] Remove empty fixELFSymbolsInTLSFixups overrides
Follow-up to 2ada0c1e6163502a8b3fd6485c290eca26ce8748
Added:
Modified:
llvm/lib/MC/MCWinCOFFStreamer.cpp
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h
llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h
llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h
llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCExpr.h
llvm/lib/Target/NVPTX/NVPTXMCExpr.h
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h
llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h
llvm/lib/Target/X86/MCTargetDesc/X86MCExpr.h
llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCExpr.h
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCWinCOFFStreamer.cpp b/llvm/lib/MC/MCWinCOFFStreamer.cpp
index 3d7eb525392e1..b1b2234119ad9 100644
--- a/llvm/lib/MC/MCWinCOFFStreamer.cpp
+++ b/llvm/lib/MC/MCWinCOFFStreamer.cpp
@@ -82,10 +82,6 @@ class MCCOFFSectionNumberTargetExpr final : public MCTargetExpr {
MCFragment *findAssociatedFragment() const override {
return SectionSymbol.getFragment();
}
-
- void fixELFSymbolsInTLSFixups(MCAssembler &) const override {
- llvm_unreachable("Not supported for ELF");
- }
};
/// MCExpr that represents the offset to a symbol from the beginning of its
@@ -123,10 +119,6 @@ class MCCOFFSectionOffsetTargetExpr final : public MCTargetExpr {
MCFragment *findAssociatedFragment() const override {
return Symbol.getFragment();
}
-
- void fixELFSymbolsInTLSFixups(MCAssembler &) const override {
- llvm_unreachable("Not supported for ELF");
- }
};
MCWinCOFFStreamer::MCWinCOFFStreamer(MCContext &Context,
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h
index 75e676bb7d508..f590b0364df7f 100644
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h
+++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h
@@ -100,7 +100,6 @@ class AMDGPUMCExpr : public MCTargetExpr {
bool isSymbolUsedInExpression(const MCSymbol *Sym) const override;
void visitUsedExpr(MCStreamer &Streamer) const override;
MCFragment *findAssociatedFragment() const override;
- void fixELFSymbolsInTLSFixups(MCAssembler &) const override{};
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h b/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h
index 5f32b37a8b60a..b00ad1e874d13 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h
@@ -90,9 +90,6 @@ class ARMMCExpr : public MCTargetExpr {
return getSubExpr()->findAssociatedFragment();
}
- // There are no TLS ARMMCExprs at the moment.
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
-
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
}
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h b/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h
index 08249cb8d170a..f32d31d55454b 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h
+++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.h
@@ -73,8 +73,6 @@ class AVRMCExpr : public MCTargetExpr {
return getSubExpr()->findAssociatedFragment();
}
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
-
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
}
diff --git a/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCExpr.h b/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCExpr.h
index 18291651ea227..c2af9070f3146 100644
--- a/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCExpr.h
+++ b/llvm/lib/Target/Lanai/MCTargetDesc/LanaiMCExpr.h
@@ -43,9 +43,6 @@ class LanaiMCExpr : public MCTargetExpr {
return getSubExpr()->findAssociatedFragment();
}
- // There are no TLS LanaiMCExprs at the moment.
- void fixELFSymbolsInTLSFixups(MCAssembler & /*Asm*/) const override {}
-
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
}
diff --git a/llvm/lib/Target/NVPTX/NVPTXMCExpr.h b/llvm/lib/Target/NVPTX/NVPTXMCExpr.h
index d95b61c34acfe..1018686e7b278 100644
--- a/llvm/lib/Target/NVPTX/NVPTXMCExpr.h
+++ b/llvm/lib/Target/NVPTX/NVPTXMCExpr.h
@@ -81,9 +81,6 @@ class NVPTXFloatMCExpr : public MCTargetExpr {
void visitUsedExpr(MCStreamer &Streamer) const override {};
MCFragment *findAssociatedFragment() const override { return nullptr; }
- // There are no TLS NVPTXMCExprs at the moment.
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
-
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
}
@@ -122,9 +119,6 @@ class NVPTXGenericMCSymbolRefExpr : public MCTargetExpr {
void visitUsedExpr(MCStreamer &Streamer) const override {};
MCFragment *findAssociatedFragment() const override { return nullptr; }
- // There are no TLS NVPTXMCExprs at the moment.
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
-
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
}
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h
index 7f4b377302e54..1b3cef32bd0c3 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h
@@ -149,9 +149,6 @@ class PPCMCExpr : public MCTargetExpr {
return getSubExpr()->findAssociatedFragment();
}
- // There are no TLS PPCMCExprs at the moment.
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
-
bool evaluateAsConstant(int64_t &Res) const;
static bool classof(const MCExpr *E) {
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h
index 98f3a23e996e3..920d57d5c294a 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h
@@ -54,9 +54,6 @@ class SystemZMCExpr : public MCTargetExpr {
return getSubExpr()->findAssociatedFragment();
}
- // There are no TLS SystemZMCExprs at the moment.
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
-
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
}
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCExpr.h b/llvm/lib/Target/X86/MCTargetDesc/X86MCExpr.h
index 37e15193b0435..4997940f720dc 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCExpr.h
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCExpr.h
@@ -67,9 +67,6 @@ class X86MCExpr : public MCTargetExpr {
void visitUsedExpr(MCStreamer &Streamer) const override {}
MCFragment *findAssociatedFragment() const override { return nullptr; }
- // There are no TLS X86MCExprs at the moment.
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
-
static bool classof(const MCExpr *E) {
return E->getKind() == MCExpr::Target;
}
diff --git a/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCExpr.h b/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCExpr.h
index 92ffb5c50d02a..c1a903b49de62 100644
--- a/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCExpr.h
+++ b/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaMCExpr.h
@@ -47,8 +47,6 @@ class XtensaMCExpr : public MCTargetExpr {
return getSubExpr()->findAssociatedFragment();
}
- void fixELFSymbolsInTLSFixups(MCAssembler &Asm) const override {}
-
static VariantKind getVariantKindForName(StringRef name);
static StringRef getVariantKindName(VariantKind Kind);
};
More information about the llvm-commits
mailing list