Page MenuHomePhabricator

[opaque pointer types] [NFC] DataLayout::getIndexedOffset: take source element type instead of pointer type and rename to getIndexedOffsetInType.
ClosedPublic

Authored by eddyb on Jan 17 2016, 2:54 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

eddyb updated this revision to Diff 45132.Jan 17 2016, 2:54 PM
eddyb retitled this revision from to [opaque pointer types] [breaking-change] [NFC] Refactor gep_type_iterator and getIndexedOffset not to touch PointerType::getElementType..
eddyb updated this object.
eddyb added reviewers: mjacob, dblaikie.
eddyb added a subscriber: llvm-commits.
eddyb updated this object.Jan 19 2016, 9:37 AM
eddyb updated this object.Jan 19 2016, 9:43 AM
eddyb updated this revision to Diff 45278.Jan 19 2016, 9:45 AM

Rebased on top of D16302 (on top of trunk).

eddyb updated this revision to Diff 45598.Jan 21 2016, 2:43 PM

Rebased to account for renames in D16282.

eddyb updated this object.Jan 21 2016, 4:01 PM
mjacob edited edge metadata.Jan 21 2016, 4:25 PM

The title of this revision seems to be wrong. I don't see any changes to the API of gep_type_iterator.

include/llvm/IR/DataLayout.h
446 ↗(On Diff #45598)

I'd like to hear another comment on the name before you commit this.

lib/IR/DataLayout.cpp
730–732 ↗(On Diff #45598)

I don't really like this. If this is required, we should consider changing the generic_gep_type_iterator API first.

eddyb updated this revision to Diff 45631.Jan 21 2016, 5:42 PM
eddyb edited edge metadata.

Rebased on top of rL258474.

eddyb retitled this revision from [opaque pointer types] [breaking-change] [NFC] Refactor gep_type_iterator and getIndexedOffset not to touch PointerType::getElementType. to [opaque pointer types] [NFC] DataLayout::getIndexedOffset: take source element type instead of pointer type and rename to getIndexedOffsetInType..Jan 21 2016, 5:43 PM
eddyb updated this object.
mjacob accepted this revision.Jan 21 2016, 6:56 PM
mjacob edited edge metadata.

LGTM

lib/IR/DataLayout.cpp
750 ↗(On Diff #45631)

You could inline this variable.

This revision is now accepted and ready to land.Jan 21 2016, 6:56 PM
This revision was automatically updated to reflect the committed changes.