This is an archive of the discontinued LLVM Phabricator instance.

[opaque pointer types] [NFC] Add an explicit type argument to ConstantFoldLoadFromConstPtr.
ClosedPublic

Authored by eddyb on Jan 21 2016, 10:44 AM.

Diff Detail

Event Timeline

eddyb updated this revision to Diff 45564.Jan 21 2016, 10:44 AM
eddyb retitled this revision from to [opaque pointer types] [NFC] Add an explicit type argument to ConstantFoldLoadFromConstPtr..
eddyb updated this object.
eddyb added reviewers: mjacob, dblaikie.
eddyb added a subscriber: llvm-commits.
dblaikie accepted this revision.Jan 21 2016, 4:30 PM
dblaikie edited edge metadata.

Looks OK

lib/Analysis/ConstantFolding.cpp
488

Presumably this could be getElementType (since SrcPtrTy is already a PointerType) - but in either case this is a stop-gap and will eventually be removed/migrated?

This revision is now accepted and ready to land.Jan 21 2016, 4:30 PM
mjacob added inline comments.Jan 21 2016, 4:49 PM
include/llvm/Analysis/ConstantFolding.h
98

It's not clear which type Ty refers to.

eddyb added inline comments.Jan 21 2016, 5:10 PM
lib/Analysis/ConstantFolding.cpp
488

I've been using getPointerElementType everywhere so it matches my local setup where PointerType::getPointerElementType is the only method used everywhere (the one on Value is gone and PointerType::getElementType is deprecated).

This revision was automatically updated to reflect the committed changes.