[PATCH] D19376: [MC] Create unique .pdata sections for every .text section
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 22 14:40:23 PDT 2016
rafael added a comment.
Just a few quick comments for now.
================
Comment at: include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:135
@@ -134,1 +134,3 @@
class TargetLoweringObjectFileCOFF : public TargetLoweringObjectFile {
+ mutable unsigned NextUniqueID = 1;
+
----------------
Why start with 1? Not that it is really important, but ELF start with 0.
================
Comment at: include/llvm/MC/MCContext.h:91
@@ +90,3 @@
+ unsigned NextTextSectionID = 1;
+ DenseMap<const MCSection *, unsigned> TextSectionIDs;
+
----------------
Can't this just be a field in MCSectionCOFF like it is for ELF?
================
Comment at: include/llvm/MC/MCContext.h:410
@@ +409,3 @@
+ /// section, but it may be any section containing code.
+ MCSection *getPDataSectionForTextSection(const MCSection *TextSec);
+
----------------
Can you move this out of the context? It looks similar to ELF relocation sections. We handle that mapping in the elf writer and we only createELFRelSection in the context.
http://reviews.llvm.org/D19376
More information about the llvm-commits
mailing list