mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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:
@@ -225,7 +225,7 @@ void UnwindEmitter::Emit(MCStreamer &Streamer) const {
|
||||
// Emit the unwind info structs first.
|
||||
for (const auto &CFI : Streamer.getWinFrameInfos()) {
|
||||
const MCSection *XData =
|
||||
GetXDataSection(GetSectionSuffix(CFI->Function), Context);
|
||||
getXDataSection(CFI->Function, Context);
|
||||
Streamer.SwitchSection(XData);
|
||||
EmitUnwindInfo(Streamer, CFI);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ void UnwindEmitter::Emit(MCStreamer &Streamer) const {
|
||||
// Now emit RUNTIME_FUNCTION entries.
|
||||
for (const auto &CFI : Streamer.getWinFrameInfos()) {
|
||||
const MCSection *PData =
|
||||
GetPDataSection(GetSectionSuffix(CFI->Function), Context);
|
||||
getPDataSection(CFI->Function, Context);
|
||||
Streamer.SwitchSection(PData);
|
||||
EmitRuntimeFunction(Streamer, CFI);
|
||||
}
|
||||
@@ -245,7 +245,7 @@ void UnwindEmitter::EmitUnwindInfo(MCStreamer &Streamer,
|
||||
// here and from Emit().
|
||||
MCContext &context = Streamer.getContext();
|
||||
const MCSection *xdataSect =
|
||||
GetXDataSection(GetSectionSuffix(info->Function), context);
|
||||
getXDataSection(info->Function, context);
|
||||
Streamer.SwitchSection(xdataSect);
|
||||
|
||||
llvm::EmitUnwindInfo(Streamer, info);
|
||||
|
Reference in New Issue
Block a user