[PATCH] D12423: MCAsmInfo: Allow targets to specify when the .section directive should be omitted

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 08:23:14 PDT 2015


tstellarAMD added a comment.

In http://reviews.llvm.org/D12423#235151, @rafael wrote:

> I don't think this is correct. If a target is not using
>  COFF/MachO/ELF, it should never create a
>  MCSectionCOFF/MCSectionMacho/MCSectionELF.


This isn't the issue here.  What this patch does is give targets the opportunity to control how section switches are emitted.  Using AMDGPU as an example, if the section directive is not omitted, section switches to .hsatext are printed like this:

.section        .hsatext,#alloc,#execinstr,#write

If the section directive is emitted switches are printed like this:

.hsatext

The main reason I don't want the .section directive for .hsatext sections is because it has several custom STT_* flags, and I didn't really see a good way to add support for printing these custom flags.


http://reviews.llvm.org/D12423





More information about the llvm-commits mailing list