[llvm] [llvm] remove incorrect `LLVM_ABI` annotation usage (PR #144606)

Andrew Rogers via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 14:21:20 PDT 2025


https://github.com/andrurogerz updated https://github.com/llvm/llvm-project/pull/144606

>From 52d594a13785c0b253853c045bc42ce11676e412 Mon Sep 17 00:00:00 2001
From: Andrew Rogers <andrurogerz at gmail.com>
Date: Tue, 3 Jun 2025 12:23:34 -0700
Subject: [PATCH 1/2] remove mistaken LLVM_ABI annotations

---
 llvm/include/llvm/CodeGen/MachineScheduler.h | 4 ++--
 llvm/include/llvm/MC/MCExpr.h                | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

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..dac0994df47f3 100644
--- a/llvm/include/llvm/MC/MCExpr.h
+++ b/llvm/include/llvm/MC/MCExpr.h
@@ -514,9 +514,9 @@ class LLVM_ABI MCSpecifierExpr : public MCExpr {
       : MCExpr(Specifier, Loc), Expr(Expr), specifier(S) {}
 
 public:
-  LLVM_ABI static const MCSpecifierExpr *
+  static const MCSpecifierExpr *
   create(const MCExpr *Expr, Spec S, MCContext &Ctx, SMLoc Loc = SMLoc());
-  LLVM_ABI static const MCSpecifierExpr *
+  static const MCSpecifierExpr *
   create(const MCSymbol *Sym, Spec S, MCContext &Ctx, SMLoc Loc = SMLoc());
 
   Spec getSpecifier() const { return specifier; }

>From ff8d358fb71828ba4d5c8d77b757cb9a457630a4 Mon Sep 17 00:00:00 2001
From: Andrew Rogers <andrurogerz at gmail.com>
Date: Tue, 17 Jun 2025 14:21:04 -0700
Subject: [PATCH 2/2] clang-format

---
 llvm/include/llvm/MC/MCExpr.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/llvm/include/llvm/MC/MCExpr.h b/llvm/include/llvm/MC/MCExpr.h
index dac0994df47f3..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:
-  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());
+  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