This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Rename RISCVELFStreamer.{cpp,h} to RISCVTargetELFStreamer.{cpp,h}
AbandonedPublic

Authored by jrtc27 on May 13 2019, 10:32 AM.

Details

Reviewers
asb
Summary

This now matches the name of the class, but also avoids confusion with a
target-specific MCELFStreamer.

Event Timeline

jrtc27 created this revision.May 13 2019, 10:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2019, 10:32 AM
asb requested changes to this revision.Jun 6 2019, 5:39 AM

I think this is less confusing, but there's more to be gained by having a similar naming scheme to the other backends which right now all use FooELFStreamer.{cpp,h}.

I you feel strongly about this change, I'd consider making it for all in-tree backends.

This revision now requires changes to proceed.Jun 6 2019, 5:39 AM
jrtc27 added a comment.Jun 6 2019, 5:43 AM
In D61866#1532288, @asb wrote:

I think this is less confusing, but there's more to be gained by having a similar naming scheme to the other backends which right now all use FooELFStreamer.{cpp,h}.

I you feel strongly about this change, I'd consider making it for all in-tree backends.

FooELFStreamer.cpp is not a target streamer but an MCELFStreamer. Generally the target streamers live in FooTargetStreamer.cpp. For example, MipsELFStreamer vs MipsTargetELFStreamer. At least that's my understanding, and this patch was motivated by wanting a RISCV-specific MCELFStreamer in our fork, which by that convention should be in RISCVELFStreamer.cpp.

jrtc27 added a comment.Jun 6 2019, 5:47 AM

Hm, actually, looking more closely, there seems to be inconsistency. Some backends use FooELFStreamer.cpp for an MCELFStreamer, and others for a ELF-specific target streamer. Some, like AArch64, even put both in the same file, so if you don't like this patch, I suppose the recommendation would be to do that?

jrtc27 abandoned this revision.Jul 1 2019, 8:19 AM