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

via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 07:36:57 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Adel Ejjeh (adelejjeh)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/195863.diff


1 Files Affected:

- (modified) llvm/include/llvm/Analysis/LoopInfo.h (+4-6) 


``````````diff
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;

``````````

</details>


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


More information about the llvm-commits mailing list