[llvm] [IR] Deprecate ConstantExpr::getGetElementPtr() (PR #227601)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 11:55:24 PDT 2026
AaronBallman wrote:
> @AaronBallman Can you please share the full error message (or at least where it is generated)? I assume MSVC is generating the warning in some place where clang doesn't.
Sorry, that would have been useful to do initially. :-D
```
F:\source\llvm-project\llvm\lib\IR\Constants.cpp(2672): warning C4996: 'llvm::ConstantExpr::getGetElementPtr': Use getPtrAdd() or the overload accepting DataLayout instead
F:\source\llvm-project\llvm\lib\IR\Constants.cpp(2688): warning C4996: 'llvm::ConstantExpr::getGetElementPtr': Use getPtrAdd() or the overload accepting DataLayout instead
```
> > (Also, should we be using LLVM_DEPRECATED for the annotation?)
>
> No, LLVM_DEPRECATED can only be used for pure renames (which have a machine-applicable fix-it).
Ah, good call!
https://github.com/llvm/llvm-project/pull/227601
More information about the llvm-commits
mailing list