This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel][nfc] Remove unnecessary cast
ClosedPublic

Authored by fdeazeve on Jul 28 2022, 11:02 AM.

Details

Summary

The getOperand method already returns a Constant when it is called on
a ConstantExpression, as such the cast is not needed. To prevent a type
mismatch between the different return statements of the lambda, the
lambda return type is explicitly provided.

Diff Detail

Event Timeline

fdeazeve created this revision.Jul 28 2022, 11:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2022, 11:02 AM
fdeazeve requested review of this revision.Jul 28 2022, 11:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2022, 11:02 AM
fdeazeve updated this revision to Diff 448389.Jul 28 2022, 11:04 AM
fdeazeve retitled this revision from [GlobalISEL][nfc] Remove unnecessary cast to [GlobalISel][nfc] Remove unnecessary cast.

Changed commit message style

@nikic Thank you for catching this in D130642!

This revision is now accepted and ready to land.Jul 28 2022, 11:29 AM

The failing tests are timeouts that seem to happen in other reviews too

This revision was landed with ongoing or failed builds.Jul 28 2022, 2:55 PM
This revision was automatically updated to reflect the committed changes.