[llvm] ea902d1 - [IR] Remove deprecated opaque pointer migration methods
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 03:26:38 PDT 2024
Author: Nikita Popov
Date: 2024-09-24T12:26:30+02:00
New Revision: ea902d1b36e4e3a7d7bdd0f7bce3c460b6dd6e80
URL: https://github.com/llvm/llvm-project/commit/ea902d1b36e4e3a7d7bdd0f7bce3c460b6dd6e80
DIFF: https://github.com/llvm/llvm-project/commit/ea902d1b36e4e3a7d7bdd0f7bce3c460b6dd6e80.diff
LOG: [IR] Remove deprecated opaque pointer migration methods
Remove the following methods:
* Type::getNonOpaquePointerElementType()
* Type::isOpaquePointerTy()
* LLVMContext::supportsTypedPointers()
* LLVMContext::setOpaquePointers()
These were used temporarily during the opaque pointers migration,
and are no longer needed.
Added:
Modified:
llvm/include/llvm/IR/LLVMContext.h
llvm/include/llvm/IR/Type.h
llvm/lib/IR/LLVMContext.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/LLVMContext.h b/llvm/include/llvm/IR/LLVMContext.h
index 6ffa2bdaa319a7..558816e146587a 100644
--- a/llvm/include/llvm/IR/LLVMContext.h
+++ b/llvm/include/llvm/IR/LLVMContext.h
@@ -316,17 +316,6 @@ class LLVMContext {
/// LLVMContext is used by compilation.
void setOptPassGate(OptPassGate&);
- /// Set whether opaque pointers are enabled. The method may be called multiple
- /// times, but only with the same value. Note that creating a pointer type or
- /// otherwise querying the opaque pointer mode performs an implicit set to
- /// the default value.
- [[deprecated("Opaque pointers are always enabled")]]
- void setOpaquePointers(bool Enable) const;
-
- /// Whether typed pointers are supported. If false, all pointers are opaque.
- [[deprecated("Always returns false")]]
- bool supportsTypedPointers() const;
-
/// Get or set the current "default" target CPU (target-cpu function
/// attribute). The intent is that compiler frontends will set this to a value
/// that reflects the attribute that a function would get "by default" without
diff --git a/llvm/include/llvm/IR/Type.h b/llvm/include/llvm/IR/Type.h
index b88c8aece8126c..2f53197df19998 100644
--- a/llvm/include/llvm/IR/Type.h
+++ b/llvm/include/llvm/IR/Type.h
@@ -250,10 +250,6 @@ class Type {
/// True if this is an instance of PointerType.
bool isPointerTy() const { return getTypeID() == PointerTyID; }
- /// True if this is an instance of an opaque PointerType.
- LLVM_DEPRECATED("Use isPointerTy() instead", "isPointerTy")
- bool isOpaquePointerTy() const { return isPointerTy(); };
-
/// Return true if this is a pointer type or a vector of pointer types.
bool isPtrOrPtrVectorTy() const { return getScalarType()->isPointerTy(); }
@@ -406,14 +402,6 @@ class Type {
inline StringRef getTargetExtName() const;
- /// Only use this method in code that is not reachable with opaque pointers,
- /// or part of deprecated methods that will be removed as part of the opaque
- /// pointers transition.
- [[deprecated("Pointers no longer have element types")]]
- Type *getNonOpaquePointerElementType() const {
- llvm_unreachable("Pointers no longer have element types");
- }
-
/// Given vector type, change the element type,
/// whilst keeping the old number of elements.
/// For non-vectors simply returns \p EltTy.
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index c0fee93a233808..22e60772def43f 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -377,14 +377,6 @@ std::unique_ptr<DiagnosticHandler> LLVMContext::getDiagnosticHandler() {
return std::move(pImpl->DiagHandler);
}
-void LLVMContext::setOpaquePointers(bool Enable) const {
- assert(Enable && "Cannot disable opaque pointers");
-}
-
-bool LLVMContext::supportsTypedPointers() const {
- return false;
-}
-
StringRef LLVMContext::getDefaultTargetCPU() {
return pImpl->DefaultTargetCPU;
}
More information about the llvm-commits
mailing list