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

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 08:00:04 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Sergei Barannikov (s-barannikov)

<details>
<summary>Changes</summary>

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

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


2 Files Affected:

- (modified) llvm/include/llvm/IR/DataLayout.h (-8) 
- (modified) llvm/lib/IR/DataLayout.cpp (-5) 


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

``````````

</details>


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


More information about the llvm-commits mailing list