[llvm] [LLVM][IR] Emit diagnostic for invalid pointee type for constant GEP. (PR #165383)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 13:25:41 PDT 2025
================
@@ -4541,6 +4541,9 @@ bool LLParser::parseValID(ValID &ID, PerFunctionState *PFS, Type *ExpectedTy) {
if (!GetElementPtrInst::getIndexedType(Ty, Indices))
return error(ID.Loc, "invalid getelementptr indices");
+ if (!ConstantExpr::isSupportedGetElementPtr(Ty))
----------------
nikic wrote:
nit: I'd move this above the getIndexedType check.
https://github.com/llvm/llvm-project/pull/165383
More information about the llvm-commits
mailing list