[llvm] c0ce9ad - [llvm] remove incorrect `LLVM_ABI` annotation usage (#144606)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 09:34:17 PDT 2025
Author: Andrew Rogers
Date: 2025-06-23T09:34:14-07:00
New Revision: c0ce9adf603c2a49f685b1c1846a01e3253adb29
URL: https://github.com/llvm/llvm-project/commit/c0ce9adf603c2a49f685b1c1846a01e3253adb29
DIFF: https://github.com/llvm/llvm-project/commit/c0ce9adf603c2a49f685b1c1846a01e3253adb29.diff
LOG: [llvm] remove incorrect `LLVM_ABI` annotation usage (#144606)
## Overview
This patch removes incorrect usage of `LLVM_ABI` macros that break the
(currently incomplete) LLVM Windows DLL build.
- ec71d80 added `LLVM_ABI` to template methods fully declared in a
header file
- 254a92d added `LLVM_ABI` to members of a class already annotated with
`LLVM_ABI`
# Background
Documentation for `LLVM_ABI` and related annotations is found in the
LLVM repo
[here](https://github.com/llvm/llvm-project/blob/main/llvm/docs/InterfaceExportAnnotations.rst).
Added:
Modified:
llvm/include/llvm/CodeGen/MachineScheduler.h
llvm/include/llvm/MC/MCExpr.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/MachineScheduler.h b/llvm/include/llvm/CodeGen/MachineScheduler.h
index 486508e760dc5..e7a7091acee64 100644
--- a/llvm/include/llvm/CodeGen/MachineScheduler.h
+++ b/llvm/include/llvm/CodeGen/MachineScheduler.h
@@ -1403,7 +1403,7 @@ createCopyConstrainDAGMutation(const TargetInstrInfo *TII,
/// default scheduler if the target does not set a default.
/// Adds default DAG mutations.
template <typename Strategy = GenericScheduler>
-LLVM_ABI ScheduleDAGMILive *createSchedLive(MachineSchedContext *C) {
+ScheduleDAGMILive *createSchedLive(MachineSchedContext *C) {
ScheduleDAGMILive *DAG =
new ScheduleDAGMILive(C, std::make_unique<Strategy>(C));
// Register DAG post-processors.
@@ -1423,7 +1423,7 @@ LLVM_ABI ScheduleDAGMILive *createSchedLive(MachineSchedContext *C) {
/// Create a generic scheduler with no vreg liveness or DAG mutation passes.
template <typename Strategy = PostGenericScheduler>
-LLVM_ABI ScheduleDAGMI *createSchedPostRA(MachineSchedContext *C) {
+ScheduleDAGMI *createSchedPostRA(MachineSchedContext *C) {
ScheduleDAGMI *DAG = new ScheduleDAGMI(C, std::make_unique<Strategy>(C),
/*RemoveKillFlags=*/true);
const TargetSubtargetInfo &STI = C->MF->getSubtarget();
diff --git a/llvm/include/llvm/MC/MCExpr.h b/llvm/include/llvm/MC/MCExpr.h
index 4ec780d8ff94f..8d66ed22875df 100644
--- a/llvm/include/llvm/MC/MCExpr.h
+++ b/llvm/include/llvm/MC/MCExpr.h
@@ -514,10 +514,10 @@ class LLVM_ABI MCSpecifierExpr : public MCExpr {
: MCExpr(Specifier, Loc), Expr(Expr), specifier(S) {}
public:
- LLVM_ABI static const MCSpecifierExpr *
- create(const MCExpr *Expr, Spec S, MCContext &Ctx, SMLoc Loc = SMLoc());
- LLVM_ABI static const MCSpecifierExpr *
- create(const MCSymbol *Sym, Spec S, MCContext &Ctx, SMLoc Loc = SMLoc());
+ static const MCSpecifierExpr *create(const MCExpr *Expr, Spec S,
+ MCContext &Ctx, SMLoc Loc = SMLoc());
+ static const MCSpecifierExpr *create(const MCSymbol *Sym, Spec S,
+ MCContext &Ctx, SMLoc Loc = SMLoc());
Spec getSpecifier() const { return specifier; }
const MCExpr *getSubExpr() const { return Expr; }
More information about the llvm-commits
mailing list