[PATCH] D21743: Convenience function for MCStreamer to get named sections when lowering.

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 09:36:47 PDT 2016


rnk added a comment.

In http://reviews.llvm.org/D21743#468102, @majnemer wrote:

> Reid, didn't you add something like this for COFF?


MCContext::getAssociativeCOFFSection, which doesn't do this name appending stuff because it wastes object file space.

This patch is NFC, and that's fine, but at a high level, should we continue to name our sections things like .text._Z3foov (ala GCC), or should we be shortening to just .text? I thought Rafael did that at one point?


================
Comment at: include/llvm/MC/MCStreamer.h:767
@@ +766,3 @@
+  /// used to further configure this named section.
+  virtual MCSection *getNamedGroupSection(StringRef Section,
+                                          StringRef Identifier,
----------------
>From reading the doc comments, this looks very ELF-specific. Maybe this should be getELFSectionInGroup? See a similar method getAssociativeCOFFSection.


http://reviews.llvm.org/D21743





More information about the llvm-commits mailing list