[Patch] Don't declare all text sections at the start of the .s

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Mar 19 13:43:05 PDT 2015


On 19 March 2015 at 16:33, Eric Christopher <echristo at gmail.com> wrote:
> Few comments:
>
> a) why not virtual and override for ChangeSection?

It would mean that more basic streamers would have to return a bool
from it. This way only the ObjectStreamer has to keep track of which
sections are being created.

> b) every where you pass true/false to createObjectStreamer you should
> comment what it is,

Will do.

> c) Is there a way to just subclass the mach-o MCObjectStreamer to avoid the
> boolean?

I don't think so. The problem is that the property we are trying to
enforce is not true of every .o file, just the ones our codegen
produces.

In particular, a .s file should still be free to put a regular section
after a DWARF one (some of the .s files in test/MC do it, so the
testing for this is already in.).

So the check is really needed when the file is MachO and the streamer
is created from CodeGen.

Cheers,
Rafael



More information about the llvm-commits mailing list