[llvm] [NFC][LoopInfo] Remove redundant LLVM_ABI from Loop member functions (PR #195863)

Adel Ejjeh via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 07:35:48 PDT 2026


https://github.com/adelejjeh created https://github.com/llvm/llvm-project/pull/195863

Remove `LLVM_ABI` from `addStringLoopAttribute` and `addIntLoopAttribute`.
The `Loop` class is already annotated `LLVM_ABI`, so the per-member
annotations are redundant and cause errors on Windows.

Addresses post-merge feedback on #194676.

This patch was generated with the help of Claude and reviewed by a human.

>From e4c94240aa4231f53cda38e9d1457f1f4374b8d6 Mon Sep 17 00:00:00 2001
From: Adel Ejjeh <adel.ejjeh at amd.com>
Date: Tue, 5 May 2026 09:34:54 -0500
Subject: [PATCH] [NFC][LoopInfo] Remove redundant LLVM_ABI from Loop member
 functions

Remove `LLVM_ABI` from `addStringLoopAttribute` and `addIntLoopAttribute`.
The `Loop` class is already annotated `LLVM_ABI`, so the per-member
annotations are redundant and cause errors on Windows.

Addresses post-merge feedback on #194676.

This patch was generated with the help of Claude and reviewed by a human.

Co-Authored-By: Claude Opus 4 (1M context) <noreply at anthropic.com>
---
 llvm/include/llvm/Analysis/LoopInfo.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h
index 8089a363dc8b5..ce413cd398444 100644
--- a/llvm/include/llvm/Analysis/LoopInfo.h
+++ b/llvm/include/llvm/Analysis/LoopInfo.h
@@ -374,9 +374,8 @@ class LLVM_ABI Loop : public LoopBase<BasicBlock, Loop> {
   /// it to the loop metadata via makePostTransformationMetadata. Any existing
   /// attributes whose key starts with one of \p RemovePrefixes are stripped
   /// first.
-  LLVM_ABI void
-  addStringLoopAttribute(StringRef Name,
-                         ArrayRef<StringRef> RemovePrefixes = {}) const;
+  void addStringLoopAttribute(StringRef Name,
+                              ArrayRef<StringRef> RemovePrefixes = {}) const;
 
   /// Add an integer metadata attribute to this loop's loop-ID node.
   ///
@@ -384,9 +383,8 @@ class LLVM_ABI Loop : public LoopBase<BasicBlock, Loop> {
   /// it to the loop metadata via makePostTransformationMetadata. Any existing
   /// attributes whose key starts with one of \p RemovePrefixes are stripped
   /// first.
-  LLVM_ABI void
-  addIntLoopAttribute(StringRef Name, unsigned Value,
-                      ArrayRef<StringRef> RemovePrefixes = {}) const;
+  void addIntLoopAttribute(StringRef Name, unsigned Value,
+                           ArrayRef<StringRef> RemovePrefixes = {}) const;
 
   void dump() const;
   void dumpVerbose() const;



More information about the llvm-commits mailing list