MC Win64: Put unwind info for COMDAT code into the same COMDAT group

Summary:
This fixes a long standing issue where we would emit many little .text
sections and only one .pdata and .xdata section. Now we generate one
.pdata / .xdata pair per .text section and associate them correctly.

Fixes PR19667.

Reviewers: majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5181

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2014-09-04 17:42:03 +00:00
parent 54dfc533fc
commit b9cb76d3f3
8 changed files with 162 additions and 49 deletions

View File

@@ -284,6 +284,13 @@ namespace llvm {
const MCSectionCOFF *getCOFFSection(StringRef Section);
/// Gets or creates a section equivalent to Sec that is associated with the
/// section containing KeySym. For example, to create a debug info section
/// associated with an inline function, pass the normal debug info section
/// as Sec and the function symbol as KeySym.
const MCSectionCOFF *getAssociativeCOFFSection(const MCSectionCOFF *Sec,
const MCSymbol *KeySym);
/// @}
/// @name Dwarf Management

View File

@@ -65,9 +65,10 @@ struct FrameInfo {
class UnwindEmitter {
public:
static StringRef GetSectionSuffix(const MCSymbol *Function);
static const MCSection *GetPDataSection(StringRef Suffix, MCContext &Context);
static const MCSection *GetXDataSection(StringRef Suffix, MCContext &Context);
static const MCSection *getPDataSection(const MCSymbol *Function,
MCContext &Context);
static const MCSection *getXDataSection(const MCSymbol *Function,
MCContext &Context);
virtual ~UnwindEmitter() { }