[all-commits] [llvm/llvm-project] 5035e7: [IR] Don't accept nullptr as GEP element type
Nikita Popov via All-commits
all-commits at lists.llvm.org
Fri Jul 9 08:38:16 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5035e7be1a8ab923e1a82def7e313cc11c0b176f
https://github.com/llvm/llvm-project/commit/5035e7be1a8ab923e1a82def7e313cc11c0b176f
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-07-09 (Fri, 09 Jul 2021)
Changed paths:
M llvm/include/llvm/IR/Instructions.h
Log Message:
-----------
[IR] Don't accept nullptr as GEP element type
GetElementPtrInst::Create() (and IRBuilder methods based on it)
currently accept nullptr as the element type, and will fetch the
element type from the pointer in that case. Remove this fallback,
as it is incompatible with opaque pointers. I've removed a handful
of leftover calls using this behavior as a preliminary step.
Out-of-tree code affected by this change should either pass a proper
type, or can temporarily explicitly call getPointerElementType(),
if the newly added assertion is encountered.
Differential Revision: https://reviews.llvm.org/D105653
More information about the All-commits
mailing list