[llvm] [DataLayout] Remove deprecated method (PR #101495)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 07:59:32 PDT 2024


https://github.com/s-barannikov created https://github.com/llvm/llvm-project/pull/101495

The method has been deprecated for a year and a half now.

>From 71b176aff1241c281b4ec7342a243cb633947097 Mon Sep 17 00:00:00 2001
From: Sergei Barannikov <barannikov88 at gmail.com>
Date: Thu, 1 Aug 2024 17:58:33 +0300
Subject: [PATCH] [DataLayout] Remove deprecated method

The method has been deprecated for a year and a half now.
---
 llvm/include/llvm/IR/DataLayout.h | 8 --------
 llvm/lib/IR/DataLayout.cpp        | 5 -----
 2 files changed, 13 deletions(-)

diff --git a/llvm/include/llvm/IR/DataLayout.h b/llvm/include/llvm/IR/DataLayout.h
index 5f7034b5ee36f..afcb8bcb77f10 100644
--- a/llvm/include/llvm/IR/DataLayout.h
+++ b/llvm/include/llvm/IR/DataLayout.h
@@ -534,14 +534,6 @@ class DataLayout {
     return getIntegerAlignment(BitWidth, /* abi_or_pref */ true);
   }
 
-  /// Returns the preferred stack/global alignment for the specified
-  /// type.
-  ///
-  /// This is always at least as good as the ABI alignment.
-  /// FIXME: Deprecate this function once migration to Align is over.
-  LLVM_DEPRECATED("use getPrefTypeAlign instead", "getPrefTypeAlign")
-  uint64_t getPrefTypeAlignment(Type *Ty) const;
-
   /// Returns the preferred stack/global alignment for the specified
   /// type.
   ///
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index 17897f77b4edb..5104cb86320be 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -865,11 +865,6 @@ Align DataLayout::getABITypeAlign(Type *Ty) const {
   return getAlignment(Ty, true);
 }
 
-/// TODO: Remove this function once the transition to Align is over.
-uint64_t DataLayout::getPrefTypeAlignment(Type *Ty) const {
-  return getPrefTypeAlign(Ty).value();
-}
-
 Align DataLayout::getPrefTypeAlign(Type *Ty) const {
   return getAlignment(Ty, false);
 }



More information about the llvm-commits mailing list