The convenience methods that now are marked as deprecated are no
long used in-tree. The getInt8PtrTy helper is however still used in
many places, so it is not marked as deprecated to make it possible
to build LLVM with -Werror.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Any concerns about removing these helpers from Type? (@nikic I know you marked some other old API:s as deprecated rather than removing them directly, when dropping support for typed pointers. But I'm not sure if we need a deprecation period for this?)
For typed pointer APIs I would usually go for deprecation, because some of them were quite widely used. I guess if you didn't need to remove many uses in preparation for this patch, then dropping them directly is fine.
libcxxabi/test/test_demangle.pass.cpp | ||
---|---|---|
22532 ↗ | (On Diff #548768) | This test should not be modified. (It has no relation to LLVM; just uses our symbol names.) |
Revert the changed made to libcxxabi/test/test_demangle.pass.cpp
Mark unused functions as deprecated rather than removing them
(but also make the inline wrappers of getInt8Ptr).
llvm/include/llvm/IR/Type.h | ||
---|---|---|
491 | these are no longer static, that looks unintentional. probably nobody is using these anymore because they're not static, might as well just remove them or make them static again |
llvm/include/llvm/IR/Type.h | ||
---|---|---|
491 | Since all of them are doing the same thing I made these unused versions inline wrappers of getInt8PtrTy (which still is static). @aeubanks : I'm not sure I understand how it is a problem that they aren't static? (But I'm not sure we need to keep lots of deprecated methods. Not much difference really in getting a Wdeprecated warning or a failed compilation due to a missing function, at least not if building with Werror.) |
llvm/include/llvm/IR/Type.h | ||
---|---|---|
491 | It's a non-static member function now, not a static class method. Previously you'd use PointerType::getFloatPtrTy(), now you need an instance of a Type to call it. |
llvm/include/llvm/IR/Type.h | ||
---|---|---|
491 | Ah right, ofcourse. Now I got it! Great catch. But then I think I'll just follow up with at patch that removes these functions (no one has complained so far anyway, and right now it is broken). |
these are no longer static, that looks unintentional. probably nobody is using these anymore because they're not static, might as well just remove them or make them static again