diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -149,6 +149,8 @@ have been removed. * Removed ``LLVMPassManagerBuilderRef`` and functions interacting with it. These belonged to the no longer supported legacy pass manager. +* As part of the opaque pointer transition, ``LLVMGetElementType`` no longer + gives the pointee type of a pointer type. Changes to the FastISel infrastructure -------------------------------------- diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -1411,8 +1411,6 @@ /** * Obtain the element type of an array or vector type. * - * This currently also works for pointer types, but this usage is deprecated. - * * @see llvm::SequentialType::getElementType() */ LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty); diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -811,8 +811,6 @@ LLVMTypeRef LLVMGetElementType(LLVMTypeRef WrappedTy) { auto *Ty = unwrap(WrappedTy); - if (auto *PTy = dyn_cast(Ty)) - return wrap(PTy->getNonOpaquePointerElementType()); if (auto *ATy = dyn_cast(Ty)) return wrap(ATy->getElementType()); return wrap(cast(Ty)->getElementType());