Skip to content

[DataLayout] Remove deprecated method #101495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

s-barannikov
Copy link
Contributor

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

The method has been deprecated for a year and a half now.
@llvmbot
Copy link
Member

llvmbot commented Aug 1, 2024

@llvm/pr-subscribers-llvm-ir

Author: Sergei Barannikov (s-barannikov)

Changes

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

Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@s-barannikov s-barannikov merged commit e4104c0 into llvm:main Aug 7, 2024
9 checks passed
@s-barannikov s-barannikov deleted the datalayout/deprecated-method branch August 7, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants