This is an archive of the discontinued LLVM Phabricator instance.

[llvm-c] Remove pointee support from LLVMGetElementType
ClosedPublic

Authored by aeubanks on Mar 9 2023, 12:09 PM.

Diff Detail

Event Timeline

aeubanks created this revision.Mar 9 2023, 12:09 PM
Herald added a project: Restricted Project. · View Herald Transcript
aeubanks requested review of this revision.Mar 9 2023, 12:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2023, 12:09 PM
nikic added a comment.Mar 9 2023, 12:14 PM

I think it's too early to drop the LLVMPointerType functions. These are useful for frontends that still support LLVM 14 and for that reason still generate typed IR (which is automatically converted to opaque IR). For rustc the need for this will go away in about 6 months.

Of course it's possible for the frontend to call one or the other depending on version, but I don't think there's any benefit to that at this point.

my motivation for this is to prevent people from being able to add code to our repo that relies on typed pointers. just removing LLVMPointerTypeIsOpaque and the pointer branch in LLVMGetElementType should achieve that, does that sound ok?

nikic added a comment.Mar 9 2023, 1:04 PM

my motivation for this is to prevent people from being able to add code to our repo that relies on typed pointers. just removing LLVMPointerTypeIsOpaque and the pointer branch in LLVMGetElementType should achieve that, does that sound ok?

That would be fine I think. Though possible just dropping the branch from LLVMGetElementType is enough?

aeubanks updated this revision to Diff 503919.Mar 9 2023, 1:36 PM

only touch LLVMGetElementType

aeubanks retitled this revision from [llvm-c] Remove typed pointer APIs to [llvm-c] Remove pointee support from LLVMGetElementType.Mar 9 2023, 1:36 PM
nikic accepted this revision.Mar 9 2023, 2:56 PM

LG

This revision is now accepted and ready to land.Mar 9 2023, 2:56 PM
This revision was landed with ongoing or failed builds.Mar 9 2023, 3:42 PM
This revision was automatically updated to reflect the committed changes.