This cleans up all GetElementPtr creation in LLVM to explicitly pass a
value type rather than deriving it from the pointer's element-type.
Details
Diff Detail
- Build Status
Buildable 27381 Build 27380: arc lint + arc unit
Event Timeline
Oops, I just noticed I accidentally included the API removals into this review, but those are intended to come later in the series, after I finish the needed changes to clang.
I'll remove them from here and re-upload.
Sounds good - thanks!
llvm/include/llvm/IR/Constants.h | ||
---|---|---|
1153 ↗ | (On Diff #183345) | What overload sets are these nullptr+delete versions meant to account for? |
llvm/include/llvm/IR/Constants.h | ||
---|---|---|
1153 ↗ | (On Diff #183345) | This change was not intended to be in this patch (and is now removed). But it'll be back in a future patch, so I'll explain anyhow. Unlike the other instructions (Load, Call, Invoke), the GEP creation APIs mostly already have a mandatory Type argument -- but unfortunately allow it to be nullptr, in which case it defaults to the pointee type. These overloads (which are copies of all the GEP-creation APIs, with Type* -> nullptr) are to help catch and fix those callers. |