Currently, some fairly arbitrary subset of overriden methods in RISCVISelLowering are private rather than public (which is the visibility they have in TargetLowering). I suspect this is a holdover from too closely copying another backend.
I don't see a good reason for having different visibility in the child vs the parent (though I could be missing something?), and D78545 pointed out this can be difficult for some downstream patches. This patch solves the wider problem by simply making all overridden methods match the public visiblity of the parent.