Page MenuHomePhabricator

[opaque pointer types] CallSite: use getFunctionType() instead of going through PointerType::getElementType.
ClosedPublic

Authored by eddyb on Jan 17 2016, 11:27 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

eddyb updated this revision to Diff 45112.Jan 17 2016, 11:27 AM
eddyb retitled this revision from to [opaque pointer types] CallSite: use getFunctionType() instead of going through getPointerElementType..
eddyb updated this object.
eddyb added a reviewer: mjacob.
eddyb added subscribers: dblaikie, llvm-commits.
eddyb retitled this revision from [opaque pointer types] CallSite: use getFunctionType() instead of going through getPointerElementType. to [opaque pointer types] CallSite: use getFunctionType() instead of going through PointerType::getElementType..Jan 17 2016, 12:34 PM
dblaikie added inline comments.Jan 17 2016, 1:46 PM
lib/Target/Mips/Mips16HardFloat.cpp
430 ↗(On Diff #45112)

This code seems to be going to some efforts to support the possibility that V is null - does that case need to be handled in the new code?

eddyb added inline comments.Jan 17 2016, 2:26 PM
lib/Target/Mips/Mips16HardFloat.cpp
430 ↗(On Diff #45112)

Not as far as I can tell, getFunctionType() seems to be guaranteed non-null.
The tests pass, although I'm not sure what kind of coverage LLVM has for the Mips16 (sub?)target.

dblaikie accepted this revision.Jan 17 2016, 2:28 PM
dblaikie added a reviewer: dblaikie.

Great - thanks! Please commit

This revision is now accepted and ready to land.Jan 17 2016, 2:28 PM
mjacob accepted this revision.Jan 17 2016, 2:38 PM
mjacob edited edge metadata.

LGTM too. I'll commit it for you.

lib/Target/Mips/Mips16HardFloat.cpp
430 ↗(On Diff #45112)

CI->getCalledValue() shouldn't return nullptr as well.

This revision was automatically updated to reflect the committed changes.