Skip to content

[llvm][IR] Remove method IRBuilderBase::getInt8PtrTy #74096

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 2 commits into from
Dec 1, 2023

Conversation

JOE1994
Copy link
Member

@JOE1994 JOE1994 commented Dec 1, 2023

Users should migrate to IRBuilderBase::getPtrTy.

@JOE1994 JOE1994 requested review from nikic and aeubanks December 1, 2023 16:16
@llvmbot llvmbot added the llvm:ir label Dec 1, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 1, 2023

@llvm/pr-subscribers-llvm-ir

Author: Youngsuk Kim (JOE1994)

Changes

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

1 Files Affected:

  • (modified) llvm/include/llvm/IR/IRBuilder.h (+1)
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 2cd9a665e9e5d05..f68dfc37ce9f01c 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -565,6 +565,7 @@ class IRBuilderBase {
   }
 
   /// Fetch the type representing a pointer to an 8-bit integer value.
+  [[deprecated("Pointers no longer have element types. Use getPtrTy instead.")]]
   PointerType *getInt8PtrTy(unsigned AddrSpace = 0) {
     return getPtrTy(AddrSpace);
   }

Copy link

github-actions bot commented Dec 1, 2023

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

I think you can go ahead and remove the method directly.

@JOE1994 JOE1994 changed the title [llvm][IR] Deprecate IRBuilderBase::getInt8PtrTy [llvm][IR] Remove method IRBuilderBase::getInt8PtrTy Dec 1, 2023
@JOE1994
Copy link
Member Author

JOE1994 commented Dec 1, 2023

I think you can go ahead and remove the method directly.

Thank you. I pushed a follow-up commit that removes the method.

Is the IRBuilderBase::getInt8PtrTy method not exposed externally to clients?
Which methods can we delete without having to deprecate it first?

@aeubanks
Copy link
Contributor

aeubanks commented Dec 1, 2023

it is exposed, but the C++ API is unstable.

I edited the commit message to mention what people should migrate to

@aeubanks aeubanks merged commit 6cd7500 into llvm:main Dec 1, 2023
@JOE1994 JOE1994 deleted the deprecate_getInt8PtrTy branch December 1, 2023 16:54
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.

4 participants