This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][AMDGPU][WebAssembly] Use static_cast instead of a reinterpret_cast to downcast in parseMachineFunctionInfo.
ClosedPublic

Authored by craig.topper on Apr 6 2022, 2:54 PM.

Details

Summary

static_cast is a little safer here since the compiler will
ensure we're casting to a class derived from
yaml::MachineFunctionInfo.

I believe this first appeared on AMDGPU and was copied to the
other two targets.

Spotted when it was being copied to RISCV in D123178.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 6 2022, 2:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 2:54 PM
craig.topper requested review of this revision.Apr 6 2022, 2:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2022, 2:54 PM
arsenm accepted this revision.Apr 6 2022, 2:56 PM
This revision is now accepted and ready to land.Apr 6 2022, 2:56 PM
This revision was landed with ongoing or failed builds.Apr 6 2022, 3:10 PM
This revision was automatically updated to reflect the committed changes.